summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-03-04 17:17:43 -0800
committerJeremy Allison <jra@samba.org>2009-03-04 17:17:43 -0800
commitc8ea9d1f13096cd7f51e5972915a61ca65b56ac3 (patch)
treed6426802557d251357c7b594134ff3959ef4527a /source3
parentbadad0a6a6d2b0f0a34b09f83d0ea25596dc9bf6 (diff)
downloadsamba-c8ea9d1f13096cd7f51e5972915a61ca65b56ac3.tar.gz
samba-c8ea9d1f13096cd7f51e5972915a61ca65b56ac3.tar.bz2
samba-c8ea9d1f13096cd7f51e5972915a61ca65b56ac3.zip
Second part of fix for #6154, ensure we return max access
if admin user. Jeremy.
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 569c260319..acd347520d 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -76,6 +76,15 @@ static NTSTATUS check_open_rights(struct connection_struct *conn,
*access_granted = 0;
+ if (conn->server_info->utok.uid == 0 || conn->admin_user) {
+ /* I'm sorry sir, I didn't know you were root... */
+ *access_granted = access_mask;
+ if (access_mask & SEC_FLAG_MAXIMUM_ALLOWED) {
+ *access_granted |= FILE_GENERIC_ALL;
+ }
+ return NT_STATUS_OK;
+ }
+
status = SMB_VFS_GET_NT_ACL(conn, fname,
(OWNER_SECURITY_INFORMATION |
GROUP_SECURITY_INFORMATION |