svn commit: samba r17435 - in branches/SAMBA_3_0_23/source: lib smbd

idra at samba.org idra at samba.org
Sun Aug 6 23:43:03 GMT 2006


Author: idra
Date: 2006-08-06 23:43:02 +0000 (Sun, 06 Aug 2006)
New Revision: 17435

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

Log:

Have not tested against a solaris machine, but even in the case
that an OS do not support reading ntegroup informations from
files, at worst we will get an error from innetgr and simply
return False.
Passing NULL for the domain is a legal wildcard operation on all
the manpages I could find on the network.

Simo.


Modified:
   branches/SAMBA_3_0_23/source/lib/access.c
   branches/SAMBA_3_0_23/source/smbd/password.c


Changeset:
Modified: branches/SAMBA_3_0_23/source/lib/access.c
===================================================================
--- branches/SAMBA_3_0_23/source/lib/access.c	2006-08-06 18:24:36 UTC (rev 17434)
+++ branches/SAMBA_3_0_23/source/lib/access.c	2006-08-06 23:43:02 UTC (rev 17435)
@@ -83,8 +83,7 @@
 			yp_get_default_domain(&mydomain);
 
 		if (!mydomain) {
-			DEBUG(0,("Unable to get default yp domain.\n"));
-			return False;
+			DEBUG(0,("Unable to get default yp domain. Try without it.\n"));
 		}
 		if (!(hostname = SMB_STRDUP(s))) {
 			DEBUG(1,("out of memory for strdup!\n"));
@@ -95,7 +94,7 @@
 		
 		DEBUG(5,("looking for %s of domain %s in netgroup %s gave %s\n", 
 			 hostname,
-			 mydomain, 
+			 mydomain?mydomain:"(ANY)", 
 			 tok+1,
 			 BOOLSTR(netgroup_ok)));
 

Modified: branches/SAMBA_3_0_23/source/smbd/password.c
===================================================================
--- branches/SAMBA_3_0_23/source/smbd/password.c	2006-08-06 18:24:36 UTC (rev 17434)
+++ branches/SAMBA_3_0_23/source/smbd/password.c	2006-08-06 23:43:02 UTC (rev 17435)
@@ -420,12 +420,11 @@
 		yp_get_default_domain(&mydomain);
 
 	if(mydomain == NULL) {
-		DEBUG(5,("Unable to get default yp domain\n"));
-		return False;
+		DEBUG(5,("Unable to get default yp domain, let's try without specifying it\n"));
 	}
 
 	DEBUG(5,("looking for user %s of domain %s in netgroup %s\n",
-		user, mydomain, ngname));
+		user, mydomain?mydomain:"(ANY)", ngname));
 
 	if (innetgr(ngname, NULL, user, mydomain)) {
 		DEBUG(5,("user_in_netgroup: Found\n"));
@@ -441,7 +440,7 @@
 		strlower_m(lowercase_user);
 	
 		DEBUG(5,("looking for user %s of domain %s in netgroup %s\n",
-			lowercase_user, mydomain, ngname));
+			lowercase_user, mydomain?mydomain:"(ANY)", ngname));
 
 		if (innetgr(ngname, NULL, lowercase_user, mydomain)) {
 			DEBUG(5,("user_in_netgroup: Found\n"));



More information about the samba-cvs mailing list