mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +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:
parent
cdb875f5f7
commit
b71362b176
@ -460,12 +460,12 @@ int main(int argc, const char *argv[])
|
|||||||
{
|
{
|
||||||
char *cmdstr = NULL;
|
char *cmdstr = NULL;
|
||||||
struct cmd_set **cmd_set;
|
struct cmd_set **cmd_set;
|
||||||
|
struct conn_struct_tos *c = NULL;
|
||||||
struct vfs_state *vfs;
|
struct vfs_state *vfs;
|
||||||
int i;
|
int i;
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
char cwd[MAXPATHLEN];
|
char cwd[MAXPATHLEN];
|
||||||
TALLOC_CTX *frame = talloc_stackframe();
|
TALLOC_CTX *frame = talloc_stackframe();
|
||||||
struct tevent_context *ev;
|
|
||||||
struct auth_session_info *session_info = NULL;
|
struct auth_session_info *session_info = NULL;
|
||||||
NTSTATUS status = NT_STATUS_OK;
|
NTSTATUS status = NT_STATUS_OK;
|
||||||
|
|
||||||
@ -527,7 +527,7 @@ int main(int argc, const char *argv[])
|
|||||||
sec_init();
|
sec_init();
|
||||||
init_guest_session_info(frame);
|
init_guest_session_info(frame);
|
||||||
locking_init();
|
locking_init();
|
||||||
vfs = talloc_zero(NULL, struct vfs_state);
|
vfs = talloc_zero(frame, struct vfs_state);
|
||||||
if (vfs == NULL) {
|
if (vfs == NULL) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -536,18 +536,15 @@ int main(int argc, const char *argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ev = server_event_context();
|
status = create_conn_struct_tos(server_messaging_context(),
|
||||||
|
-1,
|
||||||
status = create_conn_struct(vfs,
|
getcwd(cwd, sizeof(cwd)),
|
||||||
ev,
|
session_info,
|
||||||
server_messaging_context(),
|
&c);
|
||||||
&vfs->conn,
|
|
||||||
-1,
|
|
||||||
getcwd(cwd, sizeof(cwd)),
|
|
||||||
session_info);
|
|
||||||
if (!NT_STATUS_IS_OK(status)) {
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
vfs->conn = c->conn;
|
||||||
|
|
||||||
vfs->conn->share_access = FILE_GENERIC_ALL;
|
vfs->conn->share_access = FILE_GENERIC_ALL;
|
||||||
vfs->conn->read_only = false;
|
vfs->conn->read_only = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user