diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/torture/masktest.c | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c index 2c938baacc..a1734abded 100644 --- a/source3/torture/masktest.c +++ b/source3/torture/masktest.c @@ -167,10 +167,8 @@ return a connection to a server static struct cli_state *connect_one(char *share) { struct cli_state *c; - struct nmb_name called, calling; char *server_n; char *server; - struct sockaddr_storage ss; NTSTATUS status; server = share+2; @@ -181,40 +179,15 @@ static struct cli_state *connect_one(char *share) server_n = server; - zero_sockaddr(&ss); - - make_nmb_name(&calling, "masktest", 0x0); - make_nmb_name(&called , server, 0x20); - - again: - zero_sockaddr(&ss); - - /* have to open a new connection */ - if (!(c=cli_initialise())) { - DEBUG(0,("Connection to %s failed\n", server_n)); - return NULL; - } - - status = cli_connect(c, server_n, &ss); + status = cli_connect_nb(server, NULL, 0, "masktest", Undefined, &c); if (!NT_STATUS_IS_OK(status)) { - DEBUG(0,("Connection to %s failed. Error %s\n", server_n, nt_errstr(status) )); + DEBUG(0,("Connection to %s failed. Error %s\n", server_n, + nt_errstr(status))); return NULL; } c->protocol = max_protocol; - if (!cli_session_request(c, &calling, &called)) { - DEBUG(0,("session request to %s failed\n", called.name)); - cli_shutdown(c); - if (strcmp(called.name, "*SMBSERVER")) { - make_nmb_name(&called , "*SMBSERVER", 0x20); - goto again; - } - return NULL; - } - - DEBUG(4,(" session request ok\n")); - status = cli_negprot(c); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("protocol negotiation failed: %s\n", |