]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: smbd_check_access_rights_sd(). Add dirfsp parameter.
authorJeremy Allison <jra@samba.org>
Tue, 8 Jun 2021 19:16:04 +0000 (12:16 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:31 +0000 (13:14 +0000)
Pass down to parent_override_delete().

Always pass fsp->conn->cwd_fsp for now.

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

index c7ab1bfa5d858a416f9ba4c7f50f12347dce0216..edced0d613129c4e0d9505b89f1ce32e3b3dd47d 100644 (file)
@@ -98,6 +98,7 @@ static bool parent_override_delete(connection_struct *conn,
 
 static NTSTATUS smbd_check_access_rights_sd(
                                struct connection_struct *conn,
+                               struct files_struct *dirfsp,
                                const struct smb_filename *smb_fname,
                                struct security_descriptor *sd,
                                bool use_privs,
@@ -220,7 +221,7 @@ access_denied:
        }
 
        if (parent_override_delete(conn,
-                                  conn->cwd_fsp,
+                                  dirfsp,
                                   smb_fname,
                                   access_mask,
                                   rejected_mask))
@@ -289,6 +290,7 @@ NTSTATUS smbd_check_access_rights_fsp(struct files_struct *fsp,
        }
 
        return smbd_check_access_rights_sd(fsp->conn,
+                                          fsp->conn->cwd_fsp,
                                           fsp->fsp_name,
                                           sd,
                                           use_privs,