svn commit: samba r5029 - in branches/SAMBA_3_0/source/printing: .

jerry at samba.org jerry at samba.org
Thu Jan 27 02:56:21 GMT 2005


Author: jerry
Date: 2005-01-27 02:56:18 +0000 (Thu, 27 Jan 2005)
New Revision: 5029

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=5029

Log:
after talking to Rob, ensure that we set the NETIOSNAME.domainname
as the longname in the published printer information since this
is what we will have used when we joined the domain.

More testing on this tomorrow.  


Modified:
   branches/SAMBA_3_0/source/printing/nt_printing.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/nt_printing.c
===================================================================
--- branches/SAMBA_3_0/source/printing/nt_printing.c	2005-01-27 02:16:02 UTC (rev 5028)
+++ branches/SAMBA_3_0/source/printing/nt_printing.c	2005-01-27 02:56:18 UTC (rev 5029)
@@ -2595,6 +2595,7 @@
 {
 	REGVAL_CTR *ctr = NULL;
 	fstring longname;
+	fstring dnssuffix;
 	char *allocated_string = NULL;
         const char *ascii_str;
 	int i;
@@ -2606,7 +2607,15 @@
 	map_sz_into_ctr(ctr, SPOOL_REG_PRINTERNAME, info2->sharename);
 	map_sz_into_ctr(ctr, SPOOL_REG_SHORTSERVERNAME, global_myname());
 
-	get_mydnsfullname(longname);
+	/* we make the assumption that the netbios name is the same 
+	   as the DNS name sinc ethe former will be what we used to 
+	   join the domain */
+
+	if ( get_mydnsdomname( dnssuffix ) )
+		fstr_sprintf( longname, "%s.%s", global_myname(), dnssuffix );
+	else
+		fstrcpy( longname, global_myname() );
+		
 	map_sz_into_ctr(ctr, SPOOL_REG_SERVERNAME, longname);
 
 	asprintf(&allocated_string, "\\\\%s\\%s", longname, info2->sharename);



More information about the samba-cvs mailing list