summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-08-04 22:18:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:32 -0500
commitab75c563704fa86c409072bf1b0938e005aff5ca (patch)
treeba9e27291f7dc6cf6d33e6eeb13bb49a10fa51e6
parent43c7f6d1d1ca6de7f0185b07d4459350ad6c2ca2 (diff)
downloadsamba-ab75c563704fa86c409072bf1b0938e005aff5ca.tar.gz
samba-ab75c563704fa86c409072bf1b0938e005aff5ca.tar.bz2
samba-ab75c563704fa86c409072bf1b0938e005aff5ca.zip
r17408: Let us use netgroups even without a NIS domain but just using files
(This used to be commit c065341d3ffc9125514f563c63d416cf7c40375f)
-rw-r--r--source3/lib/access.c5
-rw-r--r--source3/smbd/password.c7
2 files changed, 5 insertions, 7 deletions
diff --git a/source3/lib/access.c b/source3/lib/access.c
index fcc795d1f2..303e3ed4c4 100644
--- a/source3/lib/access.c
+++ b/source3/lib/access.c
@@ -83,8 +83,7 @@ static BOOL string_match(const char *tok,const char *s, char *invalid_char)
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 @@ static BOOL string_match(const char *tok,const char *s, char *invalid_char)
DEBUG(5,("looking for %s of domain %s in netgroup %s gave %s\n",
hostname,
- mydomain,
+ mydomain?mydomain:"(ANY)",
tok+1,
BOOLSTR(netgroup_ok)));
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 389086e9bf..38000e93f4 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -417,12 +417,11 @@ BOOL user_in_netgroup(const char *user, const char *ngname)
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"));
@@ -438,7 +437,7 @@ BOOL user_in_netgroup(const char *user, const char *ngname)
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"));