]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Change open_file() to use check_parent_access_fsp() instead of check_parent...
authorJeremy Allison <jra@samba.org>
Mon, 24 May 2021 18:15:29 +0000 (11:15 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
No more uses of check_parent_access().

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

index 120d6bb58fe3d41642d51836d01a217d7a9e6475..0992a4f04f65e4ea73252d388bf03d983409b34e 100644 (file)
@@ -1571,16 +1571,16 @@ static NTSTATUS open_file(files_struct *fsp,
                                        return NT_STATUS_OBJECT_NAME_NOT_FOUND;
                                }
 
-                               status = check_parent_access(conn,
-                                                       conn->cwd_fsp,
-                                                       smb_fname,
+                               status = check_parent_access_fsp(
+                                                       parent_dir->fsp,
                                                        SEC_DIR_ADD_FILE);
                                if (!NT_STATUS_IS_OK(status)) {
-                                       DEBUG(10, ("open_file: "
-                                                  "check_parent_access on "
-                                                  "file %s returned %s\n",
-                                                  smb_fname_str_dbg(smb_fname),
-                                                  nt_errstr(status) ));
+                                       DBG_DEBUG("check_parent_access_fsp on "
+                                                 "directory %s for file %s "
+                                                 "returned %s\n",
+                                                 smb_fname_str_dbg(parent_dir),
+                                                 smb_fname_str_dbg(smb_fname),
+                                                 nt_errstr(status));
                                        return status;
                                }
                        }