diff options
author | Jeremy Allison <jra@samba.org> | 2007-08-08 23:56:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:29:25 -0500 |
commit | 87afcae522859d8bff3506e4f0f1c5a73fb2840a (patch) | |
tree | 66a143cb1e0f94edc4096fad318129fc6b442e07 /source3/libsmb/cliconnect.c | |
parent | e215bd8b99c28860ea237f6c7a7be6a828f34c33 (diff) | |
download | samba-87afcae522859d8bff3506e4f0f1c5a73fb2840a.tar.gz samba-87afcae522859d8bff3506e4f0f1c5a73fb2840a.tar.xz samba-87afcae522859d8bff3506e4f0f1c5a73fb2840a.zip |
r24281: Fix bug found by Herb. The vuid entry in the cli_state structure gets
left as nonzero as returned by the failed cli_session_setup_spnego. When we then try
to authenticate as the user in cli_session_setup this returns an
error "Bad userid" (as seen in wireshark).
"We should only leave cli->vuid != 0 on success. Looks like it's
getting set in the cli_session_setup_blob_receive() call and not
cleared again on error."
Jeremy.
(This used to be commit fa8e66dd8d2c68b91b27169c3c43820989f58758)
Diffstat (limited to 'source3/libsmb/cliconnect.c')
-rw-r--r-- | source3/libsmb/cliconnect.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 58f893b0600..c03097acc3f 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -583,6 +583,7 @@ static BOOL cli_session_setup_blob(struct cli_state *cli, DATA_BLOB blob, DATA_B NT_STATUS_MORE_PROCESSING_REQUIRED)) { DEBUG(0, ("cli_session_setup_blob: recieve failed (%s)\n", nt_errstr(cli_get_nt_error(cli)) )); + cli->vuid = 0; return False; } } @@ -769,6 +770,9 @@ static NTSTATUS cli_session_setup_ntlmssp(struct cli_state *cli, const char *use ntlmssp_end(&ntlmssp_state); + if (!NT_STATUS_IS_OK(nt_status)) { + cli->vuid = 0; + } return nt_status; } |