From: Jeremy Allison Date: Wed, 21 Aug 2019 19:15:01 +0000 (-0700) Subject: s3: smbd: Make smb_unix_mknod() call SMB_VFS_MKNODAT() instead of SMB_VFS_MKNOD() X-Git-Tag: tevent-0.10.1~201 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7237517c8b46a578aa38da167e42b6619f3ae68c;p=thirdparty%2Fsamba.git s3: smbd: Make smb_unix_mknod() call SMB_VFS_MKNODAT() instead of SMB_VFS_MKNOD() Use conn->cwd_fsp as current fsp. No logic change for now. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index fba6881f0fd..8870abcfb7b 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -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); }