From: Jeremy Allison Date: Thu, 5 Mar 2009 01:17:43 +0000 (-0800) Subject: Second part of fix for #6154, ensure we return max access X-Git-Tag: samba-3.4.0pre1~619 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=c8ea9d1f13096cd7f51e5972915a61ca65b56ac3;hp=badad0a6a6d2b0f0a34b09f83d0ea25596dc9bf6 Second part of fix for #6154, ensure we return max access if admin user. Jeremy. --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 569c2603192..acd347520d1 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 |