summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-11-23 00:22:17 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-11-23 00:22:17 +0000
commit13a6b9833e7fdd5e4624ccf844e0f9932d9597c1 (patch)
treeeb0a49f275dd09d09c13d6f08e2aa12517f71ce2 /source3/rpc_client
parent354c0fbc91c49f71c4760f88c0fb9e7fba11413c (diff)
downloadsamba-13a6b9833e7fdd5e4624ccf844e0f9932d9597c1.tar.gz
samba-13a6b9833e7fdd5e4624ccf844e0f9932d9597c1.tar.bz2
samba-13a6b9833e7fdd5e4624ccf844e0f9932d9597c1.zip
Merge from 3.0:
Add support for variable-length session keys in our client code. This means that we now support 'net rpc join' with KRB5 (des based) logins. Now, you need to hack 'net' to do that, but the principal is important... When we add kerberos to 'net rpc', it should be possible to still do user management and the like over RPC. - Add server-side support for variable-length session keys (as used by DES based krb5 logins). Andrew Bartlett (This used to be commit 1287cf5f921327c9ea758de46220c4e2dedc485c)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_samr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index 9bab816b81..0eebcd0a6f 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -1341,7 +1341,7 @@ NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *user_pol, uint16 switch_value,
- DATA_BLOB sess_key, SAM_USERINFO_CTR *ctr)
+ DATA_BLOB *sess_key, SAM_USERINFO_CTR *ctr)
{
prs_struct qbuf, rbuf;
SAMR_Q_SET_USERINFO q;
@@ -1353,8 +1353,8 @@ NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
ZERO_STRUCT(q);
ZERO_STRUCT(r);
- if (sess_key.length != 16) {
- DEBUG(1, ("Cannot handle user session key of length [%u]\n", sess_key.length));
+ if (!sess_key->length) {
+ DEBUG(1, ("No user session key\n"));
return NT_STATUS_NO_USER_SESSION_KEY;
}
@@ -1398,7 +1398,7 @@ NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *user_pol, uint16 switch_value,
- DATA_BLOB sess_key, SAM_USERINFO_CTR *ctr)
+ DATA_BLOB *sess_key, SAM_USERINFO_CTR *ctr)
{
prs_struct qbuf, rbuf;
SAMR_Q_SET_USERINFO2 q;
@@ -1407,8 +1407,8 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
DEBUG(10,("cli_samr_set_userinfo2\n"));
- if (sess_key.length != 16) {
- DEBUG(1, ("Cannot handle user session key of length [%u]\n", sess_key.length));
+ if (!sess_key->length) {
+ DEBUG(1, ("No user session key\n"));
return NT_STATUS_NO_USER_SESSION_KEY;
}