summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-06-15 17:29:34 +0000
committerJeremy Allison <jra@samba.org>2001-06-15 17:29:34 +0000
commitaad531ec339fba6a64598bf7ff849a3512ee4e9b (patch)
treee43819da93b1a30334b8d73d3a8159b2540cc262
parent9312eab0d134aac673caa5b1b8e8e74c25f94566 (diff)
downloadsamba-aad531ec339fba6a64598bf7ff849a3512ee4e9b.tar.gz
samba-aad531ec339fba6a64598bf7ff849a3512ee4e9b.tar.xz
samba-aad531ec339fba6a64598bf7ff849a3512ee4e9b.zip
Added Tim's pwlen fix for parse_samr. This NEEDS TESTING with WntSP1-6 and
W2Ksp1-2 before ship..... Jeremy.
-rw-r--r--source/include/rpc_samr.h1
-rw-r--r--source/rpc_parse/parse_samr.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/source/include/rpc_samr.h b/source/include/rpc_samr.h
index d996170200c..223299cfc57 100644
--- a/source/include/rpc_samr.h
+++ b/source/include/rpc_samr.h
@@ -217,6 +217,7 @@ typedef struct sam_user_info_23
typedef struct sam_user_info_24
{
uint8 pass[516];
+ uint16 passlen;
} SAM_USER_INFO_24;
diff --git a/source/rpc_parse/parse_samr.c b/source/rpc_parse/parse_samr.c
index efe4b6df0eb..36752de5742 100644
--- a/source/rpc_parse/parse_samr.c
+++ b/source/rpc_parse/parse_samr.c
@@ -5002,6 +5002,7 @@ void init_sam_user_info24(SAM_USER_INFO_24 * usr,
{
DEBUG(10, ("init_sam_user_info24: passlen: %d\n", passlen));
memcpy(usr->pass, newpass, sizeof(usr->pass));
+ usr->passlen = passlen;
}
/*******************************************************************
@@ -5023,6 +5024,12 @@ 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 (!prs_uint16("passlen", ps, depth, &usr->passlen))
+ return False;
+
+ if(!prs_align(ps))
+ return False;
+
return True;
}