diff options
author | Jeremy Allison <jra@samba.org> | 2008-11-17 14:13:20 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-11-17 14:13:20 -0800 |
commit | d8df43e65d507710de72c6743f43127ad14019fc (patch) | |
tree | 65c1cda2b08be544e02a5cfed6c30354afb38041 /source3/smbd | |
parent | a48abdaa811c76e64a3383fe970e62b7bbb3582c (diff) | |
download | samba-d8df43e65d507710de72c6743f43127ad14019fc.tar.gz samba-d8df43e65d507710de72c6743f43127ad14019fc.tar.bz2 samba-d8df43e65d507710de72c6743f43127ad14019fc.zip |
Fix bug #5900 reported by monyo@samba.gr.jp - vfs_readonly.so does not work.
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/share_access.c | 6 | ||||
-rw-r--r-- | source3/smbd/uid.c | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/source3/smbd/share_access.c b/source3/smbd/share_access.c index f5f79c86e5..9dbacc2998 100644 --- a/source3/smbd/share_access.c +++ b/source3/smbd/share_access.c @@ -252,9 +252,11 @@ bool user_ok_token(const char *username, const char *domain, bool is_share_read_only_for_token(const char *username, const char *domain, - struct nt_user_token *token, int snum) + struct nt_user_token *token, + connection_struct *conn) { - bool result = lp_readonly(snum); + int snum = SNUM(conn); + bool result = conn->read_only; if (lp_readlist(snum) != NULL) { if (token_contains_name_in_list(username, domain, diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 045de6f2d3..c238f40cfd 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -88,7 +88,8 @@ static bool check_user_ok(connection_struct *conn, uint16_t vuid, readonly_share = is_share_read_only_for_token( server_info->unix_name, pdb_get_domain(server_info->sam_account), - server_info->ptok, snum); + server_info->ptok, + conn); if (!readonly_share && !share_access_check(server_info->ptok, lp_servicename(snum), |