mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
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 <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
91e24b04de
commit
497c27a469
@ -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));
|
DEBUG(10, ("recycle: dir %s already exists\n", new_dir));
|
||||||
else {
|
else {
|
||||||
struct smb_filename *smb_fname = NULL;
|
struct smb_filename *smb_fname = NULL;
|
||||||
|
int retval;
|
||||||
|
|
||||||
DEBUG(5, ("recycle: creating new dir %s\n", new_dir));
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SMB_VFS_NEXT_MKDIR(handle, smb_fname, mode) != 0) {
|
retval = SMB_VFS_NEXT_MKDIRAT(handle,
|
||||||
DEBUG(1,("recycle: mkdir failed for %s with error: %s\n", new_dir, strerror(errno)));
|
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);
|
TALLOC_FREE(smb_fname);
|
||||||
ret = False;
|
ret = False;
|
||||||
goto done;
|
goto done;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user