1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

vfstest: make use of create_conn_struct_tos()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2018-05-25 08:49:29 +02:00
parent cdb875f5f7
commit b71362b176

View File

@ -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;