summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-12-04 18:23:45 +0100
committerGünther Deschner <gd@samba.org>2008-12-05 14:27:03 +0100
commitb883bcd4ff5fcde8db74564cadb540c9452d501c (patch)
tree04650767f8603544bd5efa01265c93bed24e0a4b /source3
parentb8204ffd03ccadf795978670e1c20247ab6aecc2 (diff)
downloadsamba-b883bcd4ff5fcde8db74564cadb540c9452d501c.tar.gz
samba-b883bcd4ff5fcde8db74564cadb540c9452d501c.tar.bz2
samba-b883bcd4ff5fcde8db74564cadb540c9452d501c.zip
s3: store user session key in cli_rpc_pipe_open_noauth().
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/include/client.h1
-rw-r--r--source3/rpc_client/cli_pipe.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 8d57fe1eed..587f3f6c67 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -52,6 +52,7 @@ struct cli_pipe_auth_data {
char *domain;
char *user_name;
+ DATA_BLOB user_session_key;
union {
struct schannel_auth_struct *schannel_auth;
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index f0c2f6709e..a2d334230d 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2979,6 +2979,9 @@ NTSTATUS cli_rpc_pipe_open_noauth(struct cli_state *cli,
auth->user_name = talloc_strdup(auth, cli->user_name);
auth->domain = talloc_strdup(auth, cli->domain);
+ auth->user_session_key = data_blob_talloc(auth,
+ cli->user_session_key.data,
+ cli->user_session_key.length);
if ((auth->user_name == NULL) || (auth->domain == NULL)) {
TALLOC_FREE(result);
@@ -3443,6 +3446,10 @@ NTSTATUS cli_get_session_key(TALLOC_CTX *mem_ctx,
cli->auth->a_u.kerberos_auth->session_key.length);
break;
case PIPE_AUTH_TYPE_NONE:
+ *session_key = data_blob_talloc(mem_ctx,
+ cli->auth->user_session_key.data,
+ cli->auth->user_session_key.length);
+ break;
default:
return NT_STATUS_NO_USER_SESSION_KEY;
}