1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

Add password length field to SAM_USER_INFO24 structure and fix init

and parse function.
(This used to be commit d2eafa7483)
This commit is contained in:
Tim Potter 2001-06-15 05:09:40 +00:00
parent 8888bf6582
commit b7e382bfb2
2 changed files with 10 additions and 1 deletions

View File

@ -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;

View File

@ -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;