From: Jeremy Allison Date: Thu, 5 Mar 2009 01:18:12 +0000 (-0800) Subject: Second part of fix for #6154, ensure we return max access X-Git-Tag: build_3.3.2_ctdb_1~124 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=34a2082e68b24694d28598e14265b57a7b4a9769;p=obnox%2Fsamba-ctdb.git Second part of fix for #6154, ensure we return max access if admin user. Jeremy. (cherry picked from commit 30d2017c7bb01adb5e9ce4bf84df845d676665de) --- diff --git a/source/smbd/open.c b/source/smbd/open.c index 9b51ff0d94..d2f85ce521 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -59,6 +59,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 |