return dst;
}
+/*
+ * Set a new session key. Used in the rpc server where we have to override the
+ * SMB level session key with SystemLibraryDTC
+ */
+
+bool server_info_set_session_key(struct auth_serversupplied_info *info,
+ DATA_BLOB session_key)
+{
+ TALLOC_FREE(info->user_session_key.data);
+
+ info->user_session_key = data_blob_talloc(
+ info, session_key.data, session_key.length);
+
+ return (info->user_session_key.data != NULL);
+}
+
static auth_serversupplied_info *guest_info = NULL;
bool init_guest_info(void)
uint16 vuid; /* points to the unauthenticated user that opened this pipe. */
+ struct auth_serversupplied_info *server_info;
+
fstring name;
fstring pipe_srv_name;
struct auth_serversupplied_info *copy_serverinfo(TALLOC_CTX *mem_ctx,
auth_serversupplied_info *src);
bool init_guest_info(void);
+bool server_info_set_session_key(struct auth_serversupplied_info *info,
+ DATA_BLOB session_key);
NTSTATUS make_server_info_guest(TALLOC_CTX *mem_ctx,
auth_serversupplied_info **server_info);
bool copy_current_user(struct current_user *dst, struct current_user *src);
return False;
}
+ TALLOC_FREE(p->server_info);
+
+ p->server_info = copy_serverinfo(p, a->server_info);
+ if (p->server_info == NULL) {
+ DEBUG(0, ("copy_serverinfo failed\n"));
+ return false;
+ }
+
+ server_info_set_session_key(p->server_info, p->session_key);
+
return True;
}
return NULL;
}
+ p->server_info = copy_serverinfo(p, conn->server_info);
+ if (p->server_info == NULL) {
+ DEBUG(0, ("open_rpc_pipe_p: copy_serverinfo failed\n"));
+ talloc_destroy(p->mem_ctx);
+ close_policy_by_pipe(p);
+ TALLOC_FREE(p);
+ return NULL;
+ }
+
DLIST_ADD(InternalPipes, p);
memcpy(p->client_address, conn->client_address,