summaryrefslogtreecommitdiffstats
path: root/source/rpc_parse/parse_samr.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-08-02 23:46:01 +0000
committerJeremy Allison <jra@samba.org>2001-08-02 23:46:01 +0000
commit310e79d01834d7373a2e99a18bb2c6056f089461 (patch)
treec993a9d411681664f9cf19f7294ea87d57f5b2c2 /source/rpc_parse/parse_samr.c
parent58731d695e4e4e07e02bc276ba100d05dd14b1e7 (diff)
downloadsamba-310e79d01834d7373a2e99a18bb2c6056f089461.tar.gz
samba-310e79d01834d7373a2e99a18bb2c6056f089461.tar.xz
samba-310e79d01834d7373a2e99a18bb2c6056f089461.zip
Allow smbpasswd to join a domain like samedit against a W2K AD server.
Jeremy.
Diffstat (limited to 'source/rpc_parse/parse_samr.c')
-rw-r--r--source/rpc_parse/parse_samr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index 0ad79b5f953..dabf8d9a8ed 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -5149,10 +5149,11 @@ static BOOL sam_io_user_info11(char *desc, SAM_USER_INFO_11 * usr,
*************************************************************************/
-void init_sam_user_info24(SAM_USER_INFO_24 * usr, char newpass[516])
+void init_sam_user_info24(SAM_USER_INFO_24 * usr, char newpass[516], uint16 pw_len)
{
DEBUG(10, ("init_sam_user_info24:\n"));
memcpy(usr->pass, newpass, sizeof(usr->pass));
+ usr->pw_len = pw_len;
}
/*******************************************************************
@@ -5174,6 +5175,10 @@ static BOOL sam_io_user_info24(char *desc, SAM_USER_INFO_24 * usr,
if(!prs_uint8s(False, "password", ps, depth, usr->pass, sizeof(usr->pass)))
return False;
+ if (MARSHALLING(ps) && (usr->pw_len != 0)) {
+ if (!prs_uint16("pw_len", ps, depth, &usr->pw_len))
+ return False;
+ }
if(!prs_align(ps))
return False;