1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r993: BUG 703 -- finishing patch by Eric Boehm <boehm@nortelnetworks.com> for netgroup case lookups

(This used to be commit 82f3fee595)
This commit is contained in:
Gerald Carter 2004-06-03 20:32:13 +00:00 committed by Gerald (Jerry) Carter
parent 9dbf2e2419
commit a020879964

View File

@ -306,7 +306,7 @@ static BOOL user_in_netgroup_list(const char *user, const char *ngname)
{
#ifdef HAVE_NETGROUP
static char *mydomain = NULL;
fstring lowercase_user, lowercase_ngname;
fstring lowercase_user;
if (mydomain == NULL)
yp_get_default_domain(&mydomain);
@ -318,25 +318,28 @@ static BOOL user_in_netgroup_list(const char *user, const char *ngname)
DEBUG(5,("looking for user %s of domain %s in netgroup %s\n",
user, mydomain, ngname));
DEBUG(5,("innetgr is %s\n", innetgr(ngname, NULL, user, mydomain)
? "TRUE" : "FALSE"));
if (innetgr(ngname, NULL, user, mydomain))
if (innetgr(ngname, NULL, user, mydomain)) {
DEBUG(5,("user_in_netgroup_list: Found\n"));
return (True);
} else {
/*
* Ok, innetgr is case sensitive. Try once more with lowercase
* just in case. Attempt to fix #703. JRA.
*/
/*
* Ok, innetgr is case sensitive. Try once more with lowercase
* just in case. Attempt to fix #703. JRA.
*/
fstrcpy(lowercase_user, user);
strlower_m(lowercase_user);
fstrcpy(lowercase_ngname, ngname);
strlower_m(lowercase_ngname);
fstrcpy(lowercase_user, user);
strlower_m(lowercase_user);
if (innetgr(lowercase_ngname, NULL, lowercase_user, mydomain))
return (True);
DEBUG(5,("looking for user %s of domain %s in netgroup %s\n",
lowercase_user, mydomain, ngname));
if (innetgr(ngname, NULL, lowercase_user, mydomain)) {
DEBUG(5,("user_in_netgroup_list: Found\n"));
return (True);
}
}
#endif /* HAVE_NETGROUP */
return False;
}