summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-06-15 05:09:40 +0000
committerTim Potter <tpot@samba.org>2001-06-15 05:09:40 +0000
commitb7e382bfb29295047d8976ab534c82d0af345e42 (patch)
tree7f621b5ea4edb1bdfb9e10c71946f447ee0b860d
parent8888bf6582485433493e76139fa36e4d9f3be3a1 (diff)
downloadsamba-b7e382bfb29295047d8976ab534c82d0af345e42.tar.gz
samba-b7e382bfb29295047d8976ab534c82d0af345e42.tar.xz
samba-b7e382bfb29295047d8976ab534c82d0af345e42.zip
Add password length field to SAM_USER_INFO24 structure and fix init
and parse function. (This used to be commit d2eafa7483a53958b6c930ca05da6e6a6c21b785)
-rw-r--r--source3/include/rpc_samr.h1
-rw-r--r--source3/rpc_parse/parse_samr.c10
2 files changed, 10 insertions, 1 deletions
diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h
index d996170200c..223299cfc57 100644
--- a/source3/include/rpc_samr.h
+++ b/source3/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/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 56ed41128dc..3695a83c674 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/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;
}
/*******************************************************************
@@ -5020,7 +5021,14 @@ static BOOL sam_io_user_info24(char *desc, SAM_USER_INFO_24 * usr,
if(!prs_align(ps))
return False;
- if(!prs_uint8s(False, "password", ps, depth, usr->pass, sizeof(usr->pass)))
+ 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;