diff options
author | Björn Jacke <bj@sernet.de> | 2009-07-14 17:55:50 +0200 |
---|---|---|
committer | Björn Jacke <bj@sernet.de> | 2009-07-14 17:55:50 +0200 |
commit | 99c7ee3c9145b6187113ff29500b55a32320a9bc (patch) | |
tree | 1a2d06157984ccf617e2055e56c594dd8452b31f /source3/smbd/password.c | |
parent | d9c0d5823624d302c6fa635d2e44aab985fd307c (diff) | |
download | samba-99c7ee3c9145b6187113ff29500b55a32320a9bc.tar.gz samba-99c7ee3c9145b6187113ff29500b55a32320a9bc.tar.bz2 samba-99c7ee3c9145b6187113ff29500b55a32320a9bc.zip |
s3: make d9c0d58236 better readble and reduce indentation
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r-- | source3/smbd/password.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 58824b6e23..b1a749736d 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -437,22 +437,22 @@ bool user_in_netgroup(struct smbd_server_connection *sconn, 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? - sconn->smb1.sessions.my_yp_domain:"(ANY)", - ngname)); - - if (innetgr(ngname, NULL, lowercase_user, - sconn->smb1.sessions.my_yp_domain)) { - DEBUG(5,("user_in_netgroup: Found\n")); - return true; - } - } else { + if (strcmp(user,lowercase_user) == 0) { /* user name was already lower case! */ return false; } + + DEBUG(5,("looking for user %s of domain %s in netgroup %s\n", + lowercase_user, + sconn->smb1.sessions.my_yp_domain? + sconn->smb1.sessions.my_yp_domain:"(ANY)", + ngname)); + + if (innetgr(ngname, NULL, lowercase_user, + sconn->smb1.sessions.my_yp_domain)) { + DEBUG(5,("user_in_netgroup: Found\n")); + return true; + } #endif /* HAVE_NETGROUP */ return false; } |