]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Add dirfsp parameter to check_access().
authorJeremy Allison <jra@samba.org>
Wed, 29 Apr 2020 22:32:21 +0000 (15:32 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 30 Apr 2020 09:11:55 +0000 (09:11 +0000)
Not yet used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Apr 30 09:11:56 UTC 2020 on sn-devel-184

source3/smbd/trans2.c

index 07cbc8388899c63d752d431ea7228b26014b93f8..7d1fe8ba05c62e51be4df2f336d659ecd4737290 100644 (file)
@@ -196,9 +196,11 @@ done:
 ********************************************************************/
 
 static NTSTATUS check_access(connection_struct *conn,
+                       struct files_struct *dirfsp,
                        const struct smb_filename *smb_fname,
                        uint32_t access_mask)
 {
+       SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
        return smbd_check_access_rights(conn,
                        smb_fname,
                        false,
@@ -817,6 +819,7 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
                status = check_access_fsp(fsp, FILE_WRITE_EA);
        } else {
                status = check_access(conn,
+                               conn->cwd_fsp,
                                smb_fname,
                                FILE_WRITE_EA);
        }
@@ -7836,6 +7839,7 @@ static NTSTATUS smb_set_file_basic_info(connection_struct *conn,
                status = check_access_fsp(fsp, FILE_WRITE_ATTRIBUTES);
        } else {
                status = check_access(conn,
+                               conn->cwd_fsp,
                                smb_fname,
                                FILE_WRITE_ATTRIBUTES);
        }
@@ -7909,6 +7913,7 @@ static NTSTATUS smb_set_info_standard(connection_struct *conn,
                status = check_access_fsp(fsp, FILE_WRITE_ATTRIBUTES);
        } else {
                status = check_access(conn,
+                               conn->cwd_fsp,
                                smb_fname,
                                FILE_WRITE_ATTRIBUTES);
        }