From ad514000db54b887c5c0f8734415e2b10698b365 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 26 Sep 2002 10:25:34 +0000 Subject: Patch from "Stefan (metze) Metzmacher" to do a *much* better job of working with usrmgr. Previously we were blanking out entires, and all sort of mischif. The new patch (which I've now had a chance to test/modify) also takes care not to expand % values (ie we go \\%L\%U -> \\server\user, we don't want to store \\server\user back) and to correctly notice 'not set' compared to 'null string' etc. Andrew Bartlett (This used to be commit ab878b6cc4132594fc33f78aeebf0d8b7266c150) --- source3/include/rpc_samr.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'source3/include') diff --git a/source3/include/rpc_samr.h b/source3/include/rpc_samr.h index 11438ae067..72c65ebfb7 100644 --- a/source3/include/rpc_samr.h +++ b/source3/include/rpc_samr.h @@ -314,6 +314,9 @@ SamrTestPrivateFunctionsUser #define ALIAS_EXECUTE ( STANDARD_RIGHTS_EXECUTE_ACCESS | \ ALIAS_ACCESS_LOOKUP_INFO ) +/* A flag for the user info 21 and 23 structs */ +#define PASS_MUST_CHANGE_AT_NEXT_LOGON 1 + typedef struct _DISP_USER_INFO { SAM_ACCOUNT *sam; } DISP_USER_INFO; @@ -366,10 +369,14 @@ typedef struct sam_user_info_23 /* uint8 pad[2] */ uint32 ptr_logon_hrs; /* pointer to logon hours */ - uint8 padding1[8]; - uint32 unknown_5; /* 0x0001 0000 */ + uint8 padding1[6]; + + uint8 passmustchange; /* 0x00 must change = 0x01 */ + + uint8 padding2; + uint8 pass[516]; UNISTR2 uni_user_name; /* NULL - username unicode string */ @@ -487,7 +494,11 @@ typedef struct sam_user_info_21 uint32 unknown_5; /* 0x0002 0000 */ - uint8 padding1[8]; + uint8 padding1[6]; + + uint8 passmustchange; /* 0x00 must change = 0x01 */ + + uint8 padding2; UNISTR2 uni_user_name; /* username unicode string */ UNISTR2 uni_full_name; /* user's full name unicode string */ @@ -507,6 +518,8 @@ typedef struct sam_user_info_21 } SAM_USER_INFO_21; +#define PASS_MUST_CHANGE_AT_NEXT_LOGON 0x01 +#define PASS_DONT_CHANGE_AT_NEXT_LOGON 0x00 /* SAM_USER_INFO_20 */ typedef struct sam_user_info_20 -- cgit