summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-01 08:57:40 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-01 14:17:12 +0200
commitac1452c4f927af621b33cb1c544b30dcf29c1903 (patch)
tree180ec737c77ba21d1a3eafe960a83aab3550c43a
parent1a9a910ce3e6b1fd6f756cb075bd2fdba465af9d (diff)
downloadsamba-ac1452c4f927af621b33cb1c544b30dcf29c1903.tar.gz
samba-ac1452c4f927af621b33cb1c544b30dcf29c1903.tar.bz2
samba-ac1452c4f927af621b33cb1c544b30dcf29c1903.zip
s4:libcli/smb_composite: make use of smb1cli_session_set_session_key()
metze
-rw-r--r--source4/libcli/smb_composite/sesssetup.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/source4/libcli/smb_composite/sesssetup.c b/source4/libcli/smb_composite/sesssetup.c
index a69d300b52..fab2ce9c85 100644
--- a/source4/libcli/smb_composite/sesssetup.c
+++ b/source4/libcli/smb_composite/sesssetup.c
@@ -208,7 +208,13 @@ static void request_handler(struct smbcli_request *req)
null_data_blob);
}
set_user_session_key(session, &session_key);
+
+ c->status = smb1cli_session_set_session_key(session->smbXcli,
+ session_key);
data_blob_free(&session_key);
+ if (!NT_STATUS_IS_OK(c->status)) {
+ break;
+ }
}
if (state->setup.spnego.in.secblob.length) {
@@ -346,7 +352,12 @@ static NTSTATUS session_setup_nt1(struct composite_context *c,
state->setup.nt1.in.password2);
set_user_session_key(session, &session_key);
+ nt_status = smb1cli_session_set_session_key(session->smbXcli,
+ session_key);
data_blob_free(&session_key);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ return nt_status;
+ }
}
return (*req)->status;
@@ -405,8 +416,13 @@ static NTSTATUS session_setup_old(struct composite_context *c,
NULL, &session_key);
NT_STATUS_NOT_OK_RETURN(nt_status);
set_user_session_key(session, &session_key);
-
+
+ nt_status = smb1cli_session_set_session_key(session->smbXcli,
+ session_key);
data_blob_free(&session_key);
+ if (!NT_STATUS_IS_OK(nt_status)) {
+ return nt_status;
+ }
} else if (session->options.plaintext_auth) {
state->setup.old.in.password = data_blob_talloc(state, password, strlen(password));
} else {