]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfstest: Use create_conn_struct_chdir()
authorVolker Lendecke <vl@samba.org>
Mon, 16 Feb 2026 11:46:34 +0000 (12:46 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 1 Mar 2026 20:19:35 +0000 (20:19 +0000)
We don't need to return to the old cwd when exiting the process.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/torture/vfstest.c

index 6d96b8ec5331d1bf124faf8bae918be408a77612..e5a88bca0cfec5f51667d9f42b598761e65fa7e6 100644 (file)
@@ -468,7 +468,7 @@ int main(int argc, const char *argv[])
 {
        char *cmdstr = NULL;
        struct cmd_set  **cmd_set;
-       struct conn_struct_tos *c = NULL;
+       struct conn_wrap *w = NULL;
        struct vfs_state *vfs;
        int opt;
        int i;
@@ -585,16 +585,17 @@ int main(int argc, const char *argv[])
                return -1;
        }
 
-       status = create_conn_struct_tos_cwd(global_messaging_context(),
-                                       -1,
-                                       cwd,
-                                       session_info,
-                                       &c);
+       status = create_conn_struct_chdir(talloc_tos(),
+                                         global_messaging_context(),
+                                         -1,
+                                         cwd,
+                                         session_info,
+                                         &w);
        SAFE_FREE(cwd);
        if (!NT_STATUS_IS_OK(status)) {
                return 1;
        }
-       vfs->conn = c->conn;
+       vfs->conn = conn_wrap_connection(w);
 
        vfs->conn->share_access = FILE_GENERIC_ALL;
        vfs->conn->read_only = false;