diff options
author | Jeremy Allison <jra@samba.org> | 2003-09-26 19:28:20 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-09-26 19:28:20 +0000 |
commit | 26e4e6208ae5f0cd4eccbef4fa97446d4f750f00 (patch) | |
tree | 3294bdc7b6d8d9681a436a9b5feea5cdc5bc3de4 /source3 | |
parent | 45814e729c876bdf2328d37c4d18c62a95011d05 (diff) | |
download | samba-26e4e6208ae5f0cd4eccbef4fa97446d4f750f00.tar.gz samba-26e4e6208ae5f0cd4eccbef4fa97446d4f750f00.tar.bz2 samba-26e4e6208ae5f0cd4eccbef4fa97446d4f750f00.zip |
Fix for valid users = %S in homes share.
Jeremy.
(This used to be commit c7f4e56ad5c25d477f20944e5b404ebafda9e1a8)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/password.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 32c24b3d67..958ed663e6 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -291,7 +291,9 @@ BOOL user_ok(const char *user,int snum, gid_t *groups, size_t n_groups) if (lp_invalid_users(snum)) { str_list_copy(&invalid, lp_invalid_users(snum)); if (invalid && str_list_substitute(invalid, "%S", lp_servicename(snum))) { - ret = !user_in_list(user, (const char **)invalid, groups, n_groups); + if ( invalid && str_list_sub_basic(invalid, current_user_info.smb_name) ) { + ret = !user_in_list(user, (const char **)invalid, groups, n_groups); + } } } if (invalid) @@ -299,8 +301,10 @@ BOOL user_ok(const char *user,int snum, gid_t *groups, size_t n_groups) if (ret && lp_valid_users(snum)) { str_list_copy(&valid, lp_valid_users(snum)); - if ( valid && str_list_sub_basic(valid, current_user_info.smb_name) ) { - ret = user_in_list(user, (const char **)valid, groups, n_groups); + if ( valid && str_list_substitute(valid, "%S", lp_servicename(snum)) ) { + if ( valid && str_list_sub_basic(valid, current_user_info.smb_name) ) { + ret = user_in_list(user, (const char **)valid, groups, n_groups); + } } } if (valid) |