]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Change mkdir_internal() to call SMB_VFS_MKDIRAT().
authorJeremy Allison <jra@samba.org>
Fri, 6 Sep 2019 22:05:36 +0000 (15:05 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 11 Sep 2019 18:24:30 +0000 (18:24 +0000)
Use conn->cwd_fsp as current fsp.

No logic change for now.

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

index c9c9c474472df7f381d948f9d9a1b0cb4657dddc..e6a1c8327e9f00a2a5b50818486593bdbe0daaa5 100644 (file)
@@ -3776,6 +3776,7 @@ static NTSTATUS mkdir_internal(connection_struct *conn,
        bool posix_open = false;
        bool need_re_stat = false;
        uint32_t access_mask = SEC_DIR_ADD_SUBDIR;
+       int ret;
 
        if (!CAN_WRITE(conn) || (access_mask & ~(conn->share_access))) {
                DEBUG(5,("mkdir_internal: failing share access "
@@ -3807,7 +3808,11 @@ static NTSTATUS mkdir_internal(connection_struct *conn,
                return status;
        }
 
-       if (SMB_VFS_MKDIR(conn, smb_dname, mode) != 0) {
+       ret = SMB_VFS_MKDIRAT(conn,
+                       conn->cwd_fsp,
+                       smb_dname,
+                       mode);
+       if (ret != 0) {
                return map_nt_error_from_unix(errno);
        }