svn commit: samba r16823 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

gd at samba.org gd at samba.org
Wed Jul 5 15:29:32 GMT 2006


Author: gd
Date: 2006-07-05 15:29:31 +0000 (Wed, 05 Jul 2006)
New Revision: 16823

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

Log:
Allow to call wbinfo --domain-info="" or --domain-info="." to get domain
info for our own domain.

Guenther

Modified:
   branches/SAMBA_3_0/source/nsswitch/wbinfo.c
   trunk/source/nsswitch/wbinfo.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/wbinfo.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/wbinfo.c	2006-07-05 14:55:21 UTC (rev 16822)
+++ branches/SAMBA_3_0/source/nsswitch/wbinfo.c	2006-07-05 15:29:31 UTC (rev 16823)
@@ -380,7 +380,10 @@
 	ZERO_STRUCT(request);
 	ZERO_STRUCT(response);
 
-	fstrcpy(request.domain_name, domain_name);
+	if ((strequal(domain_name, ".")) || (domain_name[0] == '\0'))
+		fstrcpy(request.domain_name, get_winbind_domain());
+	else
+		fstrcpy(request.domain_name, domain_name);
 
 	/* Send request */
 
@@ -905,9 +908,9 @@
 	ZERO_STRUCT(response);
 	
 	if (domain) {
-		/* '.' is the special sign for our own domwin */
+		/* '.' is the special sign for our own domain */
 		if ( strequal(domain, ".") )
-			fstrcpy( request.domain_name, lp_workgroup() );
+			fstrcpy( request.domain_name, get_winbind_domain() );
 		else
 			fstrcpy( request.domain_name, domain );
 	}
@@ -945,7 +948,7 @@
 
 	if (domain) {
 		if ( strequal(domain, ".") )
-			fstrcpy( request.domain_name, lp_workgroup() );
+			fstrcpy( request.domain_name, get_winbind_domain() );
 		else
 			fstrcpy( request.domain_name, domain );
 	}

Modified: trunk/source/nsswitch/wbinfo.c
===================================================================
--- trunk/source/nsswitch/wbinfo.c	2006-07-05 14:55:21 UTC (rev 16822)
+++ trunk/source/nsswitch/wbinfo.c	2006-07-05 15:29:31 UTC (rev 16823)
@@ -408,7 +408,10 @@
 	ZERO_STRUCT(request);
 	ZERO_STRUCT(response);
 
-	fstrcpy(request.domain_name, domain_name);
+	if ((strequal(domain_name, ".")) || (domain_name[0] == '\0'))
+		fstrcpy(request.domain_name, get_winbind_domain());
+	else
+		fstrcpy(request.domain_name, domain_name);
 
 	/* Send request */
 
@@ -991,9 +994,9 @@
 	ZERO_STRUCT(response);
 	
 	if (domain) {
-		/* '.' is the special sign for our own domwin */
+		/* '.' is the special sign for our own domain */
 		if ( strequal(domain, ".") )
-			fstrcpy( request.domain_name, lp_workgroup() );
+			fstrcpy( request.domain_name, get_winbind_domain() );
 		else
 			fstrcpy( request.domain_name, domain );
 	}
@@ -1031,7 +1034,7 @@
 
 	if (domain) {
 		if ( strequal(domain, ".") )
-			fstrcpy( request.domain_name, lp_workgroup() );
+			fstrcpy( request.domain_name, get_winbind_domain() );
 		else
 			fstrcpy( request.domain_name, domain );
 	}



More information about the samba-cvs mailing list