From b7e382bfb29295047d8976ab534c82d0af345e42 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 15 Jun 2001 05:09:40 +0000 Subject: Add password length field to SAM_USER_INFO24 structure and fix init and parse function. (This used to be commit d2eafa7483a53958b6c930ca05da6e6a6c21b785) --- source3/include/rpc_samr.h | 1 + source3/rpc_parse/parse_samr.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h index d996170200..223299cfc5 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 56ed41128d..3695a83c67 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; -- cgit