summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}