From e7a1027a015a9203382bfa332b36d915ccc988d6 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Wed, 29 Jan 1997 22:28:10 +0000 Subject: Fixed issue with null ypdomainname being used. Jermy. (This used to be commit 25175ce3113acad7fafb76e92f2f343d18ef4aea) --- source3/lib/username.c | 16 ++++++++++++---- 1 file 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 -- cgit