s3: VFS: vfs_recycle: Change use of SMB_VFS_NEXT_MKDIR -> SMB_VFS_NEXT_MKDIRAT.
authorJeremy Allison <jra@samba.org>
Fri, 6 Sep 2019 16:51:47 +0000 (09:51 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 11 Sep 2019 18:24:30 +0000 (18:24 +0000)
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>
source3/modules/vfs_recycle.c

index 93f281033f7e76874a52c31d89802d0c60476e51..77e1afc308c79b6b8f9920f6dd88c16dd8b239fa 100644 (file)
@@ -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;