]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Pass "dirfsp" through posix_mkdir()
authorVolker Lendecke <vl@samba.org>
Sat, 23 Nov 2024 15:51:15 +0000 (16:51 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 17 Dec 2024 12:30:30 +0000 (12:30 +0000)
One less caller of SMB_VFS_CREATE_FILE with dirfsp==NULL

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
source3/smbd/smb1_trans2.c

index c6186648a4c21f469aa76c2c49dc8975f6ee8320..942aa2665c5e0e4ea04ff0c3060e47407f17feab 100644 (file)
@@ -3146,6 +3146,7 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn,
                                struct smb_request *req,
                                char **ppdata,
                                int total_data,
+                               struct files_struct *dirfsp,
                                struct smb_filename *smb_fname,
                                int *pdata_return_size)
 {
@@ -3187,7 +3188,7 @@ static NTSTATUS smb_posix_mkdir(connection_struct *conn,
         status = SMB_VFS_CREATE_FILE(
                conn,                                   /* conn */
                req,                                    /* req */
-               NULL,                                   /* dirfsp */
+               dirfsp,                                 /* dirfsp */
                smb_fname,                              /* fname */
                FILE_READ_ATTRIBUTES,                   /* access_mask */
                FILE_SHARE_NONE,                        /* share_access */
@@ -3300,11 +3301,13 @@ static NTSTATUS smb_posix_open(connection_struct *conn,
        wire_open_mode = IVAL(pdata,4);
 
        if (wire_open_mode == (SMB_O_CREAT|SMB_O_DIRECTORY)) {
-               return smb_posix_mkdir(conn, req,
-                                       ppdata,
-                                       total_data,
-                                       smb_fname,
-                                       pdata_return_size);
+               return smb_posix_mkdir(conn,
+                                      req,
+                                      ppdata,
+                                      total_data,
+                                      dirfsp,
+                                      smb_fname,
+                                      pdata_return_size);
        }
 
        switch (wire_open_mode & SMB_ACCMODE) {