smbd: drop requirement for full open for READ_CONTROL_ACCESS, WRITE_DAC_ACCESS and...
authorRalph Boehme <slow@samba.org>
Sat, 8 May 2021 19:45:25 +0000 (21:45 +0200)
committerJule Anger <janger@samba.org>
Mon, 9 Aug 2021 11:16:15 +0000 (11:16 +0000)
This was needed before we had pathref fsps, with pathref fsps we can do
operation requiring WRITE_OWNER_ACCESS, WRITE_DAC_ACCESS and READ_CONTROL_ACCESS
on the pathref fsp.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14700

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit e71e373a07e467ff2d2328f39bd2bc285e2ba840)

source3/smbd/open.c

index c29662b4fd25bfcb02fd90603c3b994d483e36d0..2427774af1f74b0224041d51b2c3f768f4b2b2e9 100644 (file)
@@ -1279,10 +1279,7 @@ static NTSTATUS open_file(files_struct *fsp,
                FILE_WRITE_DATA |
                FILE_APPEND_DATA |
                FILE_EXECUTE |
-               WRITE_DAC_ACCESS |
-               WRITE_OWNER_ACCESS |
-               SEC_FLAG_SYSTEM_SECURITY |
-               READ_CONTROL_ACCESS;
+               SEC_FLAG_SYSTEM_SECURITY;
        bool creating = !file_existed && (flags & O_CREAT);
        bool truncating = (flags & O_TRUNC);
        bool open_fd = false;