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 | c7f4e56ad5c25d477f20944e5b404ebafda9e1a8 (patch) | |
tree | cb81c0be86f0f6f8d537fa2967a716ea3dca1068 /source/smbd | |
parent | 5840cbe5f6207471ccd3d518a6aee91d84e24a1f (diff) | |
download | samba-c7f4e56ad5c25d477f20944e5b404ebafda9e1a8.tar.gz samba-c7f4e56ad5c25d477f20944e5b404ebafda9e1a8.tar.xz samba-c7f4e56ad5c25d477f20944e5b404ebafda9e1a8.zip |
Fix for valid users = %S in homes share.
Jeremy.
Diffstat (limited to 'source/smbd')
-rw-r--r-- | source/smbd/password.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/smbd/password.c b/source/smbd/password.c index 32c24b3d679..958ed663e67 100644 --- a/source/smbd/password.c +++ b/source/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) |