diff options
author | Volker Lendecke <vl@samba.org> | 2011-05-29 09:21:03 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-05-29 12:49:34 +0200 |
commit | 8c1bb9b210fe8e7f27cfc57f7b097d9e4d3ba470 (patch) | |
tree | 8393fc9591a461308a13fa7f7a06b13ec50e2f4d | |
parent | c05802f5a0f854377a3136e0709b2f79b4f20254 (diff) | |
download | samba-8c1bb9b210fe8e7f27cfc57f7b097d9e4d3ba470.tar.gz samba-8c1bb9b210fe8e7f27cfc57f7b097d9e4d3ba470.tar.bz2 samba-8c1bb9b210fe8e7f27cfc57f7b097d9e4d3ba470.zip |
s3: Use cli_connect_nb in auth_server
-rw-r--r-- | source3/auth/auth_server.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index c7bdf0d8ec..7d1eccfdf9 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -44,12 +44,6 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx) struct named_mutex *mutex = NULL; NTSTATUS status; - if (!(cli = cli_initialise())) - return NULL; - - /* security = server just can't function with spnego */ - cli->use_spnego = False; - pserver = talloc_strdup(mem_ctx, lp_passwordserver()); p = pserver; @@ -87,11 +81,11 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx) mutex = grab_named_mutex(talloc_tos(), desthost, 10); if (mutex == NULL) { - cli_shutdown(cli); return NULL; } - status = cli_connect(cli, desthost, &dest_ss); + status = cli_connect_nb(desthost, &dest_ss, 0, 0x20, + global_myname(), Undefined, &cli); if (NT_STATUS_IS_OK(status)) { DEBUG(3,("connected to password server %s\n",desthost)); connected_ok = True; @@ -104,17 +98,11 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx) if (!connected_ok) { DEBUG(0,("password server not available\n")); - cli_shutdown(cli); return NULL; } - if (!attempt_netbios_session_request(&cli, global_myname(), - desthost, &dest_ss)) { - TALLOC_FREE(mutex); - DEBUG(1,("password server fails session request\n")); - cli_shutdown(cli); - return NULL; - } + /* security = server just can't function with spnego */ + cli->use_spnego = False; DEBUG(3,("got session\n")); |