diff options
author | Tim Potter <tpot@samba.org> | 2003-09-29 06:18:00 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-09-29 06:18:00 +0000 |
commit | 3f5f051d0086507280f820d9423009619357612e (patch) | |
tree | f76eaa1faa0bac378f0db50bb14371ac5a556913 /source3 | |
parent | 5400952f7f74d6e656fcf4ded173868ecec3cb77 (diff) | |
download | samba-3f5f051d0086507280f820d9423009619357612e.tar.gz samba-3f5f051d0086507280f820d9423009619357612e.tar.bz2 samba-3f5f051d0086507280f820d9423009619357612e.zip |
Merge from 3.0:
>Fix for valid users = %S in homes share.
>Jeremy.
(This used to be commit 799da7092c5b56914512f843789adbedec5ac8f5)
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) |