]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: always use check_access_fsp() in smb_set_info_standard()
authorRalph Boehme <slow@samba.org>
Tue, 27 Oct 2020 20:13:36 +0000 (21:13 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:31 +0000 (09:08 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/trans2.c

index a2196b7099521aa33a0103a85c908bbdc92b0723..9eec006b639c131e434792d5058f3e00e3279b2f 100644 (file)
@@ -7905,15 +7905,7 @@ static NTSTATUS smb_set_info_standard(connection_struct *conn,
        DEBUG(10,("smb_set_info_standard: file %s\n",
                smb_fname_str_dbg(smb_fname)));
 
-       if (fsp != NULL) {
-               status = check_access_fsp(fsp, FILE_WRITE_ATTRIBUTES);
-       } else {
-               status = smbd_check_access_rights(conn,
-                               conn->cwd_fsp,
-                               smb_fname,
-                               false,
-                               FILE_WRITE_ATTRIBUTES);
-       }
+       status = check_access_fsp(fsp, FILE_WRITE_ATTRIBUTES);
        if (!NT_STATUS_IS_OK(status)) {
                return status;
        }