From: Jeremy Allison Date: Fri, 6 Sep 2019 22:03:50 +0000 (-0700) Subject: s3: pysmbd: Change py_smbd_mkdir() to call SMB_VFS_MKDIRAT(). X-Git-Tag: talloc-2.3.1~886 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4e819c08736d73c046a6fba7437edc690fc9698;p=thirdparty%2Fsamba.git s3: pysmbd: Change py_smbd_mkdir() to call SMB_VFS_MKDIRAT(). Use conn->cwd_fsp as current fsp. No logic change for now. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index c0905b4b485..f7425690673 100644 --- a/source3/smbd/pysmbd.c +++ b/source3/smbd/pysmbd.c @@ -846,12 +846,15 @@ static PyObject *py_smbd_mkdir(PyObject *self, PyObject *args, PyObject *kwargs) so set our umask to 0 */ saved_umask = umask(0); - ret = SMB_VFS_MKDIR(conn, smb_fname, 00755); + ret = SMB_VFS_MKDIRAT(conn, + conn->cwd_fsp, + smb_fname, + 00755); umask(saved_umask); if (ret == -1) { - DBG_ERR("mkdir error=%d (%s)\n", errno, strerror(errno)); + DBG_ERR("mkdirat error=%d (%s)\n", errno, strerror(errno)); TALLOC_FREE(frame); return NULL; }