]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: add open_flags arg to in open_internal_dirfsp_at()
authorRalph Boehme <slow@samba.org>
Thu, 9 Apr 2020 16:24:26 +0000 (18:24 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 21 May 2020 05:23:29 +0000 (05:23 +0000)
The only caller passes in what was used internally, so no change in
behaviour. Prepares for calling open_internal_dirfsp_at() from
filename_convert() with additional flags.

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

index c50086574700bcf6c168ccbbd2a3501f087a7100..8d9a1fc4bcfba64ea90f82de7f434c4599a3eee7 100644 (file)
@@ -1369,7 +1369,11 @@ struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx,
        struct smb_Dir *dir_hnd = NULL;
        NTSTATUS status;
 
-       status = open_internal_dirfsp_at(conn, conn->cwd_fsp, smb_dname, &fsp);
+       status = open_internal_dirfsp_at(conn,
+                                        conn->cwd_fsp,
+                                        smb_dname,
+                                        O_RDONLY,
+                                        &fsp);
        if (!NT_STATUS_IS_OK(status)) {
                return NULL;
        }
index a700b3edd271470411f347e9acd6c4b050b22ba4..8968712fb3fe0d375c5ccb11cb6f7b01dec49858 100644 (file)
@@ -225,10 +225,10 @@ NTSTATUS create_internal_dirfsp_at(connection_struct *conn,
 NTSTATUS open_internal_dirfsp_at(connection_struct *conn,
                                 struct files_struct *dirfsp,
                                 const struct smb_filename *smb_dname,
+                                int open_flags,
                                 struct files_struct **_fsp)
 {
        struct files_struct *fsp = NULL;
-       int open_flags = O_RDONLY;
        NTSTATUS status;
 
        SMB_ASSERT(dirfsp == dirfsp->conn->cwd_fsp);
index 2476d08c8a24f82bfb66f7543597225439c9647f..9fdd85a37256c434ec50c1ed075ba00c493522fb 100644 (file)
@@ -455,6 +455,7 @@ NTSTATUS create_internal_dirfsp_at(connection_struct *conn,
 NTSTATUS open_internal_dirfsp_at(connection_struct *conn,
                                 struct files_struct *dirfsp,
                                 const struct smb_filename *smb_dname,
+                                int open_flags,
                                 struct files_struct **_fsp);
 
 /* The following definitions come from smbd/ipc.c  */