diff options
-rw-r--r-- | source4/librpc/idl/samr.idl | 31 | ||||
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 2 | ||||
-rw-r--r-- | source4/torture/rpc/samr.c | 4 | ||||
-rw-r--r-- | source4/torture/rpc/samr_accessmask.c | 2 |
4 files changed, 29 insertions, 10 deletions
diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl index b6cce38196..47882dfb84 100644 --- a/source4/librpc/idl/samr.idl +++ b/source4/librpc/idl/samr.idl @@ -730,6 +730,17 @@ import "misc.idl", "lsa.idl", "security.idl"; NTTIME acct_expiry; } samr_UserInfo17; + typedef [public, flag(NDR_PAHEX)] struct { + uint8 hash[16]; + } samr_Password; + + typedef struct { + samr_Password lm_pwd; + samr_Password nt_pwd; + boolean8 lm_pwd_active; + boolean8 nt_pwd_active; + } samr_UserInfo18; + typedef struct { lsa_String parameters; } samr_UserInfo20; @@ -768,6 +779,10 @@ import "misc.idl", "lsa.idl", "security.idl"; SAMR_FIELD_OWF_PWD = 0x20000000 } samr_FieldsPresent; + /* used for 'password_expired' in samr_UserInfo21 */ + const int PASS_MUST_CHANGE_AT_NEXT_LOGON = 0x01; + const int PASS_DONT_CHANGE_AT_NEXT_LOGON = 0x00; + typedef struct { NTTIME last_logon; NTTIME last_logoff; @@ -850,6 +865,7 @@ import "misc.idl", "lsa.idl", "security.idl"; [case(14)] samr_UserInfo14 info14; [case(16)] samr_UserInfo16 info16; [case(17)] samr_UserInfo17 info17; + [case(18)] samr_UserInfo18 info18; [case(20)] samr_UserInfo20 info20; [case(21)] samr_UserInfo21 info21; [case(23)] samr_UserInfo23 info23; @@ -875,10 +891,6 @@ import "misc.idl", "lsa.idl", "security.idl"; /************************/ /* Function 0x26 */ - typedef [public, flag(NDR_PAHEX)] struct { - uint8 hash[16]; - } samr_Password; - /* this is a password change interface that doesn't give the server the plaintext password. Depricated. @@ -1229,9 +1241,16 @@ import "misc.idl", "lsa.idl", "security.idl"; /************************/ /* Function 0x3e */ + + typedef enum { + SAMR_CONNECT_PRE_W2K = 1, + SAMR_CONNECT_W2K = 2, + SAMR_CONNECT_AFTER_W2K = 3 + } samr_ConnectVersion; + NTSTATUS samr_Connect4( [in,unique,string,charset(UTF16)] uint16 *system_name, - [in] uint32 unknown, + [in] samr_ConnectVersion client_version, [in] samr_ConnectAccessMask access_mask, [out,ref] policy_handle *connect_handle ); @@ -1264,7 +1283,7 @@ import "misc.idl", "lsa.idl", "security.idl"; /* Function 0x40 */ typedef struct { - uint32 unknown1; /* w2k3 gives 3 */ + samr_ConnectVersion client_version; /* w2k3 gives 3 */ uint32 unknown2; /* w2k3 gives 0 */ } samr_ConnectInfo1; diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 0fe7928cb5..22d201e58e 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -4262,7 +4262,7 @@ static NTSTATUS dcesrv_samr_Connect5(struct dcesrv_call_state *dce_call, TALLOC_ status = dcesrv_samr_Connect(dce_call, mem_ctx, &c); - r->out.info->info1.unknown1 = 3; + r->out.info->info1.client_version = SAMR_CONNECT_AFTER_W2K; r->out.info->info1.unknown2 = 0; r->out.level = r->in.level; diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index d0aee057d3..b3343e38d1 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -4525,7 +4525,7 @@ static bool test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("testing samr_Connect4\n"); r4.in.system_name = ""; - r4.in.unknown = 0; + r4.in.client_version = 0; r4.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED; r4.out.connect_handle = &h; @@ -4543,7 +4543,7 @@ static bool test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("testing samr_Connect5\n"); - info.info1.unknown1 = 0; + info.info1.client_version = 0; info.info1.unknown2 = 0; r5.in.system_name = ""; diff --git a/source4/torture/rpc/samr_accessmask.c b/source4/torture/rpc/samr_accessmask.c index f496f6300c..bfff8c9267 100644 --- a/source4/torture/rpc/samr_accessmask.c +++ b/source4/torture/rpc/samr_accessmask.c @@ -53,7 +53,7 @@ static NTSTATUS torture_samr_Connect5(struct torture_context *tctx, struct samr_Connect5 r5; union samr_ConnectInfo info; - info.info1.unknown1 = 0; + info.info1.client_version = 0; info.info1.unknown2 = 0; r5.in.system_name = ""; r5.in.level = 1; |