From: Jeremy Allison Date: Fri, 6 Sep 2019 16:51:47 +0000 (-0700) Subject: s3: VFS: vfs_recycle: Change use of SMB_VFS_NEXT_MKDIR -> SMB_VFS_NEXT_MKDIRAT. X-Git-Tag: talloc-2.3.1~889 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=497c27a4694f9563145c4de90af753e747c5ad0c;p=thirdparty%2Fsamba.git s3: VFS: vfs_recycle: Change use of SMB_VFS_NEXT_MKDIR -> SMB_VFS_NEXT_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/modules/vfs_recycle.c b/source3/modules/vfs_recycle.c index 93f281033f7..77e1afc308c 100644 --- a/source3/modules/vfs_recycle.c +++ b/source3/modules/vfs_recycle.c @@ -295,6 +295,7 @@ static bool recycle_create_dir(vfs_handle_struct *handle, const char *dname) DEBUG(10, ("recycle: dir %s already exists\n", new_dir)); else { struct smb_filename *smb_fname = NULL; + int retval; DEBUG(5, ("recycle: creating new dir %s\n", new_dir)); @@ -307,8 +308,15 @@ static bool recycle_create_dir(vfs_handle_struct *handle, const char *dname) goto done; } - if (SMB_VFS_NEXT_MKDIR(handle, smb_fname, mode) != 0) { - DEBUG(1,("recycle: mkdir failed for %s with error: %s\n", new_dir, strerror(errno))); + retval = SMB_VFS_NEXT_MKDIRAT(handle, + handle->conn->cwd_fsp, + smb_fname, + mode); + if (retval != 0) { + DBG_WARNING("recycle: mkdirat failed " + "for %s with error: %s\n", + new_dir, + strerror(errno)); TALLOC_FREE(smb_fname); ret = False; goto done;