diff options
author | Jeremy Allison <jra@samba.org> | 2011-11-15 17:29:59 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-11-16 04:20:04 +0100 |
commit | 05e841c82ce7f0f252b5eb565e457f406b3a1b39 (patch) | |
tree | ca1a83a2984684f1bbc8d21e3e9fec63dcda6614 /source3/smbd/reply.c | |
parent | 865bc0c0ace0a4f8e5eb0277def2315867273071 (diff) | |
download | samba-05e841c82ce7f0f252b5eb565e457f406b3a1b39.tar.gz samba-05e841c82ce7f0f252b5eb565e457f406b3a1b39.tar.bz2 samba-05e841c82ce7f0f252b5eb565e457f406b3a1b39.zip |
Final part of patchset to fix bug #8556 - ACL permissions ignored when SMBsetatr is requested.
This now plumbs access checks through all setattr calls.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 16 04:20:04 CET 2011 on sn-devel-104
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r-- | source3/smbd/reply.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 18ebca1ce2..7dd3260f0b 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -1275,6 +1275,13 @@ void reply_setatr(struct smb_request *req) else mode &= ~FILE_ATTRIBUTE_DIRECTORY; + status = check_access(conn, NULL, smb_fname, + FILE_WRITE_ATTRIBUTES); + if (!NT_STATUS_IS_OK(status)) { + reply_nterror(req, status); + goto out; + } + if (file_set_dosmode(conn, smb_fname, mode, NULL, false) != 0) { reply_nterror(req, map_nt_error_from_unix(errno)); |