summaryrefslogtreecommitdiff
path: root/source3/lib/username.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/username.c')
-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