summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/password.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 928ef0169e..58824b6e23 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -428,16 +428,16 @@ bool user_in_netgroup(struct smbd_server_connection *sconn,
if (innetgr(ngname, NULL, user, sconn->smb1.sessions.my_yp_domain)) {
DEBUG(5,("user_in_netgroup: Found\n"));
return true;
- } else {
-
- /*
- * 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);
+ /*
+ * 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);
+ if (strcmp(user,lowercase_user) != 0) {
DEBUG(5,("looking for user %s of domain %s in netgroup %s\n",
lowercase_user,
sconn->smb1.sessions.my_yp_domain?
@@ -449,6 +449,9 @@ bool user_in_netgroup(struct smbd_server_connection *sconn,
DEBUG(5,("user_in_netgroup: Found\n"));
return true;
}
+ } else {
+ /* user name was already lower case! */
+ return false;
}
#endif /* HAVE_NETGROUP */
return false;