From: Samba Release Account Date: Wed, 29 Jan 1997 22:28:10 +0000 (+0000) Subject: Fixed issue with null ypdomainname being used. X-Git-Tag: samba-1.9.16p10~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25175ce3113acad7fafb76e92f2f343d18ef4aea;p=thirdparty%2Fsamba.git Fixed issue with null ypdomainname being used. Jermy. --- diff --git a/source/lib/username.c b/source/lib/username.c index 0b82d79747b..07987fafb30 100644 --- a/source/lib/username.c +++ b/source/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