summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-01-29 22:28:10 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-01-29 22:28:10 +0000
commite7a1027a015a9203382bfa332b36d915ccc988d6 (patch)
treea08e0e4f68a7ec8e96939ae4f8154cef4ce047dc /source3
parent9e83cac78e683cc88f0ab8cdd4a64a062d2b56ea (diff)
downloadsamba-e7a1027a015a9203382bfa332b36d915ccc988d6.tar.gz
samba-e7a1027a015a9203382bfa332b36d915ccc988d6.tar.bz2
samba-e7a1027a015a9203382bfa332b36d915ccc988d6.zip
Fixed issue with null ypdomainname being used.
Jermy. (This used to be commit 25175ce3113acad7fafb76e92f2f343d18ef4aea)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/username.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/lib/username.c b/source3/lib/username.c
index 0b82d79747..07987fafb3 100644
--- a/source3/lib/username.c
+++ b/source3/lib/username.c
@@ -198,15 +198,23 @@ BOOL user_in_list(char *user,char *list)
static char *mydomain = NULL;
if (mydomain == 0)
yp_get_default_domain(&mydomain);
+
+ if(mydomain == 0)
+ {
+ DEBUG(5,("Unable to get default yp domain\n"));
+ }
+ else
+ {
- DEBUG(5,("looking for user %s of domain %s in netgroup %s\n",
+ DEBUG(5,("looking for user %s of domain %s in netgroup %s\n",
user, mydomain, &tok[1]));
- DEBUG(5,("innetgr is %s\n",
+ DEBUG(5,("innetgr is %s\n",
innetgr(&tok[1], (char *) 0, user, mydomain)
? "TRUE" : "FALSE"));
- if (innetgr(&tok[1], (char *)0, user, mydomain))
- return (True);
+ if (innetgr(&tok[1], (char *)0, user, mydomain))
+ return (True);
+ }
}
#endif