Author: idra
Date: 2006-08-17 16:57:42 +0000 (Thu, 17 Aug 2006)
New Revision: 17594

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

Log:

Let innetgr(0 work without binding its use to a NIS domain
(to support negroups to be stored on files/ldap/other on
platforms that support that)

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-17 16:55:48 UTC (rev 
17593)
+++ branches/SAMBA_3_0_23/source/lib/access.c   2006-08-17 16:57:42 UTC (rev 
17594)
@@ -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-17 16:55:48 UTC 
(rev 17593)
+++ branches/SAMBA_3_0_23/source/smbd/password.c        2006-08-17 16:57:42 UTC 
(rev 17594)
@@ -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"));

Reply via email to