From b71362b17699a47217a2676153db044d0e5a5a79 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 25 May 2018 08:49:29 +0200 Subject: [PATCH] vfstest: make use of create_conn_struct_tos() Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- source3/torture/vfstest.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c index 17c19012384..e17e6fc5c34 100644 --- a/source3/torture/vfstest.c +++ b/source3/torture/vfstest.c @@ -460,12 +460,12 @@ int main(int argc, const char *argv[]) { char *cmdstr = NULL; struct cmd_set **cmd_set; + struct conn_struct_tos *c = NULL; struct vfs_state *vfs; int i; char *filename = NULL; char cwd[MAXPATHLEN]; TALLOC_CTX *frame = talloc_stackframe(); - struct tevent_context *ev; struct auth_session_info *session_info = NULL; NTSTATUS status = NT_STATUS_OK; @@ -527,7 +527,7 @@ int main(int argc, const char *argv[]) sec_init(); init_guest_session_info(frame); locking_init(); - vfs = talloc_zero(NULL, struct vfs_state); + vfs = talloc_zero(frame, struct vfs_state); if (vfs == NULL) { return 1; } @@ -536,18 +536,15 @@ int main(int argc, const char *argv[]) return 1; } - ev = server_event_context(); - - status = create_conn_struct(vfs, - ev, - server_messaging_context(), - &vfs->conn, - -1, - getcwd(cwd, sizeof(cwd)), - session_info); + status = create_conn_struct_tos(server_messaging_context(), + -1, + getcwd(cwd, sizeof(cwd)), + session_info, + &c); if (!NT_STATUS_IS_OK(status)) { return 1; } + vfs->conn = c->conn; vfs->conn->share_access = FILE_GENERIC_ALL; vfs->conn->read_only = false; -- 2.34.1