s3: smbd: Make smb_unix_mknod() call SMB_VFS_MKNODAT() instead of SMB_VFS_MKNOD()
authorJeremy Allison <jra@samba.org>
Wed, 21 Aug 2019 19:15:01 +0000 (12:15 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 22 Aug 2019 18:00:34 +0000 (18:00 +0000)
Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/smbd/trans2.c

index fba6881f0fd64f82d2c03d41c33d48dc94f55f84..8870abcfb7beb4bd1f39e3e38a79192926dd6ac3 100644 (file)
@@ -7989,6 +7989,7 @@ static NTSTATUS smb_unix_mknod(connection_struct *conn,
        uint32_t raw_unixmode = IVAL(pdata,84);
        NTSTATUS status;
        mode_t unixmode;
+       int ret;
 
        if (total_data < 100) {
                return NT_STATUS_INVALID_PARAMETER;
@@ -8034,7 +8035,13 @@ static NTSTATUS smb_unix_mknod(connection_struct *conn,
                  (unsigned int)unixmode, smb_fname_str_dbg(smb_fname)));
 
        /* Ok - do the mknod. */
-       if (SMB_VFS_MKNOD(conn, smb_fname, unixmode, dev) != 0) {
+       ret = SMB_VFS_MKNODAT(conn,
+                       conn->cwd_fsp,
+                       smb_fname,
+                       unixmode,
+                       dev);
+
+       if (ret != 0) {
                return map_nt_error_from_unix(errno);
        }