]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use check_access_fsp() in set_ea()
authorRalph Boehme <slow@samba.org>
Tue, 27 Oct 2020 20:12:22 +0000 (21:12 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:31 +0000 (09:08 +0000)
We now always have a fsp.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index b883685cddbf658dc2137401e782fc5be1e4b4ab..5ab3c285ca7b52c18d2f96efb82b2be6263174b6 100644 (file)
@@ -797,15 +797,7 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
                return status;
        }
 
-       if (fsp != NULL) {
-               status = check_access_fsp(fsp, FILE_WRITE_EA);
-       } else {
-               status = smbd_check_access_rights(conn,
-                               conn->cwd_fsp,
-                               smb_fname,
-                               false,
-                               FILE_WRITE_EA);
-       }
+       status = check_access_fsp(fsp, FILE_WRITE_EA);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }