1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Add password length field to SAM_USER_INFO24 structure and fix init

and parse function.
This commit is contained in:
Tim Potter 0001-01-01 00:00:00 +00:00
parent fb80cf2aa1
commit d2eafa7483
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;