From 0e71bf8148684bbdb2a89f7099b59edc157c2f52 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 21 Sep 2004 03:51:38 +0000 Subject: r2458: Rename policy handle parameters for the SAMR pipe. Parameters now have the handle type implied by the parameter name. There are four types of handle: connect, domain, user and group handles. The various samr_Connect functions return a connect handle, and the samr_OpenFoo functions return a foo handle. There is one exception - the samr_{Get,Set}Security function can take any type of handle. Fix up all C callers. (This used to be commit 32f0f3154a8eb63de83145cbc8806b8906ccdc3e) --- source4/libnet/libnet_passwd.c | 20 +-- source4/librpc/idl/samr.idl | 130 +++++++++--------- source4/rpc_server/samr/dcesrv_samr.c | 74 +++++------ source4/rpc_server/samr/samr_password.c | 2 +- source4/torture/rpc/autoidl.c | 2 +- source4/torture/rpc/samr.c | 228 ++++++++++++++++---------------- source4/torture/rpc/svcctl.c | 1 - source4/torture/rpc/testjoin.c | 36 ++--- 8 files changed, 246 insertions(+), 247 deletions(-) diff --git a/source4/libnet/libnet_passwd.c b/source4/libnet/libnet_passwd.c index 94f48a049d..96471df1dc 100644 --- a/source4/libnet/libnet_passwd.c +++ b/source4/libnet/libnet_passwd.c @@ -338,7 +338,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * ZERO_STRUCT(p_handle); sc.in.system_name = NULL; sc.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - sc.out.handle = &p_handle; + sc.out.connect_handle = &p_handle; /* 2. do a samr_Connect to get a policy handle */ status = dcerpc_samr_Connect(c.pdc.out.dcerpc_pipe, mem_ctx, &sc); @@ -360,7 +360,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * /* prepare samr_LookupDomain */ d_name.name = r->samr.in.domain_name; - ld.in.handle = &p_handle; + ld.in.connect_handle = &p_handle; ld.in.domain = &d_name; /* 3. do a samr_LookupDomain to get the domain sid */ @@ -383,7 +383,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * /* prepare samr_OpenDomain */ ZERO_STRUCT(d_handle); - od.in.handle = &p_handle; + od.in.connect_handle = &p_handle; od.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; od.in.sid = ld.out.sid; od.out.domain_handle = &d_handle; @@ -407,7 +407,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * } /* prepare samr_LookupNames */ - ln.in.handle = &d_handle; + ln.in.domain_handle = &d_handle; ln.in.num_names = 1; ln.in.names = talloc_array_p(mem_ctx, struct samr_Name, 1); if (!ln.in.names) { @@ -445,10 +445,10 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * /* prepare samr_OpenUser */ ZERO_STRUCT(u_handle); - ou.in.handle = &d_handle; + ou.in.domain_handle = &d_handle; ou.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; ou.in.rid = ln.out.rids.ids[0]; - ou.out.acct_handle = &u_handle; + ou.out.user_handle = &u_handle; /* 6. do a samr_OpenUser to get a user handle */ status = dcerpc_samr_OpenUser(c.pdc.out.dcerpc_pipe, mem_ctx, &ou); @@ -491,7 +491,7 @@ static NTSTATUS libnet_SetPassword_samr(struct libnet_context *ctx, TALLOC_CTX * arcfour_crypt_blob(u_info.info26.password.data, 516, &confounded_session_key); memcpy(&u_info.info26.password.data[516], confounder, 16); - sui.in.handle = &u_handle; + sui.in.user_handle = &u_handle; sui.in.info = &u_info; sui.in.level = 26; @@ -542,7 +542,7 @@ UserInfo25: arcfour_crypt_blob(u_info.info25.password.data, 516, &confounded_session_key); memcpy(&u_info.info25.password.data[516], confounder, 16); - sui.in.handle = &u_handle; + sui.in.user_handle = &u_handle; sui.in.info = &u_info; sui.in.level = 25; @@ -586,7 +586,7 @@ UserInfo24: arcfour_crypt_blob(u_info.info24.password.data, 516, &session_key); - sui.in.handle = &u_handle; + sui.in.user_handle = &u_handle; sui.in.info = &u_info; sui.in.level = 24; @@ -629,7 +629,7 @@ UserInfo23: arcfour_crypt_blob(u_info.info23.password.data, 516, &session_key); - sui.in.handle = &u_handle; + sui.in.user_handle = &u_handle; sui.in.info = &u_info; sui.in.level = 23; diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl index 886c51b51f..57475041e8 100644 --- a/source4/librpc/idl/samr.idl +++ b/source4/librpc/idl/samr.idl @@ -34,7 +34,7 @@ /* notice the lack of [string] */ [in] uint16 *system_name, [in] uint32 access_mask, - [out,ref] policy_handle *handle + [out,ref] policy_handle *connect_handle ); @@ -74,7 +74,7 @@ shutdown the SAM - once you call this the SAM will be dead */ NTSTATUS samr_Shutdown ( - [in,ref] policy_handle *handle + [in,ref] policy_handle *connect_handle ); /******************/ @@ -86,7 +86,7 @@ } samr_Name; NTSTATUS samr_LookupDomain ( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *connect_handle, [in,ref] samr_Name *domain, [out] dom_sid2 *sid ); @@ -106,7 +106,7 @@ } samr_SamArray; NTSTATUS samr_EnumDomains ( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *connect_handle, [in,out,ref] uint32 *resume_handle, [in] uint32 buf_size, [out] samr_SamArray *sam, @@ -117,7 +117,7 @@ /************************/ /* Function 0x07 */ NTSTATUS samr_OpenDomain( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *connect_handle, [in] uint32 access_mask, [in,ref] dom_sid2 *sid, [out,ref] policy_handle *domain_handle @@ -235,7 +235,7 @@ } samr_DomainInfo; NTSTATUS samr_QueryDomainInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint16 level, [out,switch_is(level)] samr_DomainInfo *info ); @@ -247,7 +247,7 @@ call in w2k3 */ NTSTATUS samr_SetDomainInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint16 level, [in,switch_is(level),ref] samr_DomainInfo *info ); @@ -256,7 +256,7 @@ /************************/ /* Function 0x0a */ NTSTATUS samr_CreateDomainGroup( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in,ref] samr_Name *name, [in] uint32 access_mask, [out,ref] policy_handle *group_handle, @@ -267,7 +267,7 @@ /************************/ /* Function 0x0b */ NTSTATUS samr_EnumDomainGroups( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in,out,ref] uint32 *resume_handle, [in] uint32 max_size, [out] samr_SamArray *sam, @@ -277,10 +277,10 @@ /************************/ /* Function 0x0c */ NTSTATUS samr_CreateUser( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in,ref] samr_Name *account_name, [in] uint32 access_mask, - [out,ref] policy_handle *acct_handle, + [out,ref] policy_handle *user_handle, [out,ref] uint32 *rid ); @@ -294,7 +294,7 @@ const int SAMR_ENUM_USERS_MULTIPLIER = 54; NTSTATUS samr_EnumDomainUsers( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in,out,ref] uint32 *resume_handle, [in] uint32 acct_flags, [in] uint32 max_size, @@ -305,17 +305,17 @@ /************************/ /* Function 0x0e */ NTSTATUS samr_CreateDomAlias( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in,ref] samr_Name *aliasname, [in] uint32 access_mask, - [out,ref] policy_handle *acct_handle, + [out,ref] policy_handle *alias_handle, [out,ref] uint32 *rid ); /************************/ /* Function 0x0f */ NTSTATUS samr_EnumDomainAliases( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in,out,ref] uint32 *resume_handle, [in] uint32 account_flags, [out] samr_SamArray *sam, @@ -343,7 +343,7 @@ } samr_Ids; NTSTATUS samr_GetAliasMembership( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *alias_handle, [in,ref] lsa_SidArray *sids, [out] samr_Ids *rids ); @@ -352,7 +352,7 @@ /* Function 0x11 */ NTSTATUS samr_LookupNames( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint32 num_names, [in,ref,size_is(1000),length_is(num_names)] samr_Name *names, [out] samr_Ids rids, @@ -369,7 +369,7 @@ } samr_Names; NTSTATUS samr_LookupRids( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint32 num_rids, [in,ref,size_is(1000),length_is(num_rids)] uint32 *rids, [out] samr_Names names, @@ -379,10 +379,10 @@ /************************/ /* Function 0x13 */ NTSTATUS samr_OpenGroup( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint32 access_mask, [in] uint32 rid, - [out,ref] policy_handle *acct_handle + [out,ref] policy_handle *group_handle ); @@ -419,7 +419,7 @@ } samr_GroupInfo; NTSTATUS samr_QueryGroupInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *group_handle, [in] uint16 level, [out,switch_is(level)] samr_GroupInfo *info ); @@ -427,7 +427,7 @@ /************************/ /* Function 0x15 */ NTSTATUS samr_SetGroupInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *group_handle, [in] uint16 level, [in,switch_is(level),ref] samr_GroupInfo *info ); @@ -435,7 +435,7 @@ /************************/ /* Function 0x16 */ NTSTATUS samr_AddGroupMember( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *group_handle, [in] uint32 rid, [in] uint32 flags ); @@ -443,13 +443,13 @@ /************************/ /* Function 0x17 */ NTSTATUS samr_DeleteDomainGroup( - [in,out,ref] policy_handle *handle + [in,out,ref] policy_handle *group_handle ); /************************/ /* Function 0x18 */ NTSTATUS samr_DeleteGroupMember( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *group_handle, [in] uint32 rid ); @@ -471,7 +471,7 @@ } samr_ridArray; NTSTATUS samr_QueryGroupMember( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *group_handle, [out] uint32 *count, [out] samr_ridArray rids ); @@ -487,7 +487,7 @@ and the second to be the attributes for that rid member. */ NTSTATUS samr_SetMemberAttributesOfGroup( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *group_handle, [in] uint32 unknown1, [in] uint32 unknown2 ); @@ -496,10 +496,10 @@ /************************/ /* Function 0x1b */ NTSTATUS samr_OpenAlias ( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint32 access_mask, [in] uint32 rid, - [out,ref] policy_handle *acct_handle + [out,ref] policy_handle *alias_handle ); @@ -519,7 +519,7 @@ } samr_AliasInfo; NTSTATUS samr_QueryAliasInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *alias_handle, [in] uint16 level, [out,switch_is(level)] samr_AliasInfo *info ); @@ -527,7 +527,7 @@ /************************/ /* Function 0x1d */ NTSTATUS samr_SetAliasInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *alias_handle, [in] uint16 level, [in,switch_is(level)] samr_AliasInfo info ); @@ -535,43 +535,43 @@ /************************/ /* Function 0x1e */ NTSTATUS samr_DeleteDomAlias( - [in,out,ref] policy_handle *handle + [in,out,ref] policy_handle *alias_handle ); /************************/ /* Function 0x1f */ NTSTATUS samr_AddAliasMember( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *alias_handle, [in,ref] dom_sid2 *sid ); /************************/ /* Function 0x20 */ NTSTATUS samr_DeleteAliasMember( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *alias_handle, [in,ref] dom_sid2 *sid ); /************************/ /* Function 0x21 */ NTSTATUS samr_GetMembersInAlias( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *alias_handle, [out,ref] lsa_SidArray *sids ); /************************/ /* Function 0x22 */ NTSTATUS samr_OpenUser( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint32 access_mask, [in] uint32 rid, - [out,ref] policy_handle *acct_handle + [out,ref] policy_handle *user_handle ); /************************/ /* Function 0x23 */ NTSTATUS samr_DeleteUser( - [in,out,ref] policy_handle *handle + [in,out,ref] policy_handle *user_handle ); /************************/ @@ -791,7 +791,7 @@ } samr_UserInfo; NTSTATUS samr_QueryUserInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *user_handle, [in] uint16 level, [out,switch_is(level)] samr_UserInfo *info ); @@ -800,7 +800,7 @@ /************************/ /* Function 0x25 */ NTSTATUS samr_SetUserInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *user_handle, [in] uint16 level, [in,ref,switch_is(level)] samr_UserInfo *info ); @@ -813,7 +813,7 @@ the server the plaintext password. Depricated. */ NTSTATUS samr_ChangePasswordUser( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *user_handle, [in] bool8 lm_present, [in] samr_Password *old_lm_crypted, [in] samr_Password *new_lm_crypted, @@ -840,7 +840,7 @@ } samr_RidArray; NTSTATUS samr_GetGroupsForUser( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *user_handle, [out] samr_RidArray *rids ); @@ -899,7 +899,7 @@ } samr_DispInfo; NTSTATUS samr_QueryDisplayInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint16 level, [in] uint32 start_idx, [in] uint32 max_entries, @@ -923,7 +923,7 @@ The level corresponds to the samr_QueryDisplayInfo level */ NTSTATUS samr_GetDisplayEnumerationIndex( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint16 level, [in] samr_Name name, [out] uint32 idx @@ -938,7 +938,7 @@ w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this */ NTSTATUS samr_TestPrivateFunctionsDomain( - [in,ref] policy_handle *handle + [in,ref] policy_handle *domain_handle ); @@ -949,7 +949,7 @@ w2k3 returns NT_STATUS_NOT_IMPLEMENTED for this */ NTSTATUS samr_TestPrivateFunctionsUser( - [in,ref] policy_handle *handle + [in,ref] policy_handle *user_handle ); @@ -969,14 +969,14 @@ } samr_PwInfo; NTSTATUS samr_GetUserPwInfo( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *user_handle, [out] samr_PwInfo info ); /************************/ /* Function 0x2d */ NTSTATUS samr_RemoveMemberFromForeignDomain( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in,ref] dom_sid2 *sid ); @@ -987,7 +987,7 @@ how is this different from QueryDomainInfo ?? */ NTSTATUS samr_QueryDomainInfo2( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint16 level, [out,switch_is(level)] samr_DomainInfo *info ); @@ -999,7 +999,7 @@ how is this different from QueryUserInfo ?? */ NTSTATUS samr_QueryUserInfo2( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *user_handle, [in] uint16 level, [out,switch_is(level)] samr_UserInfo *info ); @@ -1011,7 +1011,7 @@ how is this different from QueryDisplayInfo?? */ NTSTATUS samr_QueryDisplayInfo2( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint16 level, [in] uint32 start_idx, [in] uint32 max_entries, @@ -1028,7 +1028,7 @@ how is this different from GetDisplayEnumerationIndex ?? */ NTSTATUS samr_GetDisplayEnumerationIndex2( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint16 level, [in] samr_Name name, [out] uint32 idx @@ -1038,11 +1038,11 @@ /************************/ /* Function 0x32 */ NTSTATUS samr_CreateUser2( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in,ref] samr_Name *account_name, [in] uint32 acct_flags, [in] uint32 access_mask, - [out,ref] policy_handle *acct_handle, + [out,ref] policy_handle *user_handle, [out,ref] uint32 *access_granted, [out,ref] uint32 *rid ); @@ -1055,7 +1055,7 @@ another duplicate. There must be a reason .... */ NTSTATUS samr_QueryDisplayInfo3( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint16 level, [in] uint32 start_idx, [in] uint32 max_entries, @@ -1068,14 +1068,14 @@ /************************/ /* Function 0x34 */ NTSTATUS samr_AddMultipleMembersToAlias( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *alias_handle, [in,ref] lsa_SidArray *sids ); /************************/ /* Function 0x35 */ NTSTATUS samr_RemoveMultipleMembersFromAlias( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *alias_handle, [in,ref] lsa_SidArray *sids ); @@ -1113,7 +1113,7 @@ NTSTATUS samr_Connect2( [in] unistr *system_name, [in] uint32 access_mask, - [out,ref] policy_handle *handle + [out,ref] policy_handle *connect_handle ); /************************/ @@ -1122,7 +1122,7 @@ seems to be an exact alias for samr_SetUserInfo() */ NTSTATUS samr_SetUserInfo2( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *user_handle, [in] uint16 level, [in,ref,switch_is(level)] samr_UserInfo *info ); @@ -1133,7 +1133,7 @@ this one is mysterious. I have a few guesses, but nothing working yet */ NTSTATUS samr_SetBootKeyInformation( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *connect_handle, [in] uint32 unknown1, [in] uint32 unknown2, [in] uint32 unknown3 @@ -1142,7 +1142,7 @@ /************************/ /* Function 0x3c */ NTSTATUS samr_GetBootKeyInformation( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [out] uint32 unknown ); @@ -1153,7 +1153,7 @@ /* this unknown value seems to be completely ignored by w2k3 */ [in] uint32 unknown, [in] uint32 access_mask, - [out,ref] policy_handle *handle + [out,ref] policy_handle *connect_handle ); /************************/ @@ -1162,7 +1162,7 @@ [in] unistr *system_name, [in] uint32 unknown, [in] uint32 access_mask, - [out,ref] policy_handle *handle + [out,ref] policy_handle *connect_handle ); /************************/ @@ -1208,13 +1208,13 @@ [in] uint32 access_mask, [in,out] uint32 level, [in,out,switch_is(level),ref] samr_ConnectInfo *info, - [out,ref] policy_handle *handle + [out,ref] policy_handle *connect_handle ); /************************/ /* Function 0x41 */ NTSTATUS samr_RidToSid( - [in,ref] policy_handle *handle, + [in,ref] policy_handle *domain_handle, [in] uint32 rid, [out] dom_sid2 *sid ); diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 285e92aa01..7e4e89f51d 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -45,7 +45,7 @@ static NTSTATUS samr_Connect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem struct samr_connect_state *c_state; struct dcesrv_handle *handle; - ZERO_STRUCTP(r->out.handle); + ZERO_STRUCTP(r->out.connect_handle); c_state = talloc_p(NULL, struct samr_connect_state); if (!c_state) { @@ -69,7 +69,7 @@ static NTSTATUS samr_Connect(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem handle->destroy = samr_handle_destroy; c_state->access_mask = r->in.access_mask; - *r->out.handle = handle->wire_handle; + *r->out.connect_handle = handle->wire_handle; return NT_STATUS_OK; } @@ -162,7 +162,7 @@ static NTSTATUS samr_LookupDomain(struct dcesrv_call_state *dce_call, TALLOC_CTX r->out.sid = NULL; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_CONNECT); + DCESRV_PULL_HANDLE(h, r->in.connect_handle, SAMR_HANDLE_CONNECT); c_state = h->data; @@ -209,7 +209,7 @@ static NTSTATUS samr_EnumDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX r->out.sam = NULL; r->out.num_entries = 0; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_CONNECT); + DCESRV_PULL_HANDLE(h, r->in.connect_handle, SAMR_HANDLE_CONNECT); c_state = h->data; @@ -284,7 +284,7 @@ static NTSTATUS samr_OpenDomain(struct dcesrv_call_state *dce_call, TALLOC_CTX * ZERO_STRUCTP(r->out.domain_handle); - DCESRV_PULL_HANDLE(h_conn, r->in.handle, SAMR_HANDLE_CONNECT); + DCESRV_PULL_HANDLE(h_conn, r->in.connect_handle, SAMR_HANDLE_CONNECT); c_state = h_conn->data; @@ -388,7 +388,7 @@ static NTSTATUS samr_QueryDomainInfo(struct dcesrv_call_state *dce_call, TALLOC_ r->out.info = NULL; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_DOMAIN); + DCESRV_PULL_HANDLE(h, r->in.domain_handle, SAMR_HANDLE_DOMAIN); d_state = h->data; @@ -450,7 +450,7 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO ZERO_STRUCTP(r->out.group_handle); *r->out.rid = 0; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_DOMAIN); + DCESRV_PULL_HANDLE(h, r->in.domain_handle, SAMR_HANDLE_DOMAIN); d_state = h->data; @@ -585,11 +585,11 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX NTSTATUS status; const char *container, *additional_class=NULL; - ZERO_STRUCTP(r->out.acct_handle); + ZERO_STRUCTP(r->out.user_handle); *r->out.access_granted = 0; *r->out.rid = 0; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_DOMAIN); + DCESRV_PULL_HANDLE(h, r->in.domain_handle, SAMR_HANDLE_DOMAIN); d_state = h->data; @@ -724,7 +724,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX talloc_increase_ref_count(d_state); talloc_set_destructor(a_state, samr_Account_destructor); - *r->out.acct_handle = u_handle->wire_handle; + *r->out.user_handle = u_handle->wire_handle; *r->out.access_granted = 0xf07ff; /* TODO: fix access mask calculations */ *r->out.rid = rid; @@ -743,11 +743,11 @@ static NTSTATUS samr_CreateUser(struct dcesrv_call_state *dce_call, TALLOC_CTX * /* a simple wrapper around samr_CreateUser2 works nicely */ - r2.in.handle = r->in.handle; + r2.in.domain_handle = r->in.domain_handle; r2.in.account_name = r->in.account_name; r2.in.acct_flags = ACB_NORMAL; r2.in.access_mask = r->in.access_mask; - r2.out.acct_handle = r->out.acct_handle; + r2.out.user_handle = r->out.user_handle; r2.out.access_granted = &access_granted; r2.out.rid = r->out.rid; @@ -779,7 +779,7 @@ static NTSTATUS samr_EnumDomainUsers(struct dcesrv_call_state *dce_call, TALLOC_ r->out.sam = NULL; r->out.num_entries = 0; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_DOMAIN); + DCESRV_PULL_HANDLE(h, r->in.domain_handle, SAMR_HANDLE_DOMAIN); d_state = h->data; @@ -886,7 +886,7 @@ static NTSTATUS samr_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX ZERO_STRUCT(r->out.rids); ZERO_STRUCT(r->out.types); - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_DOMAIN); + DCESRV_PULL_HANDLE(h, r->in.domain_handle, SAMR_HANDLE_DOMAIN); d_state = h->data; @@ -977,9 +977,9 @@ static NTSTATUS samr_OpenGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *m const char * const attrs[2] = { "sAMAccountName", NULL }; int ret; - ZERO_STRUCTP(r->out.acct_handle); + ZERO_STRUCTP(r->out.group_handle); - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_DOMAIN); + DCESRV_PULL_HANDLE(h, r->in.domain_handle, SAMR_HANDLE_DOMAIN); d_state = h->data; @@ -1035,7 +1035,7 @@ static NTSTATUS samr_OpenGroup(struct dcesrv_call_state *dce_call, TALLOC_CTX *m talloc_increase_ref_count(d_state); talloc_set_destructor(a_state, samr_Account_destructor); - *r->out.acct_handle = g_handle->wire_handle; + *r->out.group_handle = g_handle->wire_handle; return NT_STATUS_OK; } @@ -1104,7 +1104,7 @@ static NTSTATUS samr_QueryGroupInfo(struct dcesrv_call_state *dce_call, TALLOC_C r->out.info = NULL; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_GROUP); + DCESRV_PULL_HANDLE(h, r->in.group_handle, SAMR_HANDLE_GROUP); a_state = h->data; @@ -1160,7 +1160,7 @@ static NTSTATUS samr_SetGroupInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX struct ldb_message mod, *msg = &mod; int ret; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_GROUP); + DCESRV_PULL_HANDLE(h, r->in.group_handle, SAMR_HANDLE_GROUP); a_state = h->data; @@ -1217,9 +1217,9 @@ static NTSTATUS samr_DeleteDomainGroup(struct dcesrv_call_state *dce_call, TALLO struct samr_account_state *a_state; int ret; - *r->out.handle = *r->in.handle; + *r->out.group_handle = *r->in.group_handle; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_GROUP); + DCESRV_PULL_HANDLE(h, r->in.group_handle, SAMR_HANDLE_GROUP); a_state = h->data; @@ -1228,7 +1228,7 @@ static NTSTATUS samr_DeleteDomainGroup(struct dcesrv_call_state *dce_call, TALLO return NT_STATUS_UNSUCCESSFUL; } - ZERO_STRUCTP(r->out.handle); + ZERO_STRUCTP(r->out.group_handle); return NT_STATUS_OK; } @@ -1349,9 +1349,9 @@ static NTSTATUS samr_OpenUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *me const char * const attrs[2] = { "sAMAccountName", NULL }; int ret; - ZERO_STRUCTP(r->out.acct_handle); + ZERO_STRUCTP(r->out.user_handle); - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_DOMAIN); + DCESRV_PULL_HANDLE(h, r->in.domain_handle, SAMR_HANDLE_DOMAIN); d_state = h->data; @@ -1407,7 +1407,7 @@ static NTSTATUS samr_OpenUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *me talloc_increase_ref_count(d_state); talloc_set_destructor(a_state, samr_Account_destructor); - *r->out.acct_handle = u_handle->wire_handle; + *r->out.user_handle = u_handle->wire_handle; return NT_STATUS_OK; @@ -1424,9 +1424,9 @@ static NTSTATUS samr_DeleteUser(struct dcesrv_call_state *dce_call, TALLOC_CTX * struct samr_account_state *a_state; int ret; - *r->out.handle = *r->in.handle; + *r->out.user_handle = *r->in.user_handle; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_USER); + DCESRV_PULL_HANDLE(h, r->in.user_handle, SAMR_HANDLE_USER); a_state = h->data; @@ -1435,7 +1435,7 @@ static NTSTATUS samr_DeleteUser(struct dcesrv_call_state *dce_call, TALLOC_CTX * return NT_STATUS_UNSUCCESSFUL; } - ZERO_STRUCTP(r->out.handle); + ZERO_STRUCTP(r->out.user_handle); return NT_STATUS_OK; } @@ -1454,7 +1454,7 @@ static NTSTATUS samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CT r->out.info = NULL; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_USER); + DCESRV_PULL_HANDLE(h, r->in.user_handle, SAMR_HANDLE_USER); a_state = h->data; @@ -1634,7 +1634,7 @@ static NTSTATUS samr_SetUserInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX int ret; NTSTATUS status = NT_STATUS_OK; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_USER); + DCESRV_PULL_HANDLE(h, r->in.user_handle, SAMR_HANDLE_USER); a_state = h->data; @@ -1889,7 +1889,7 @@ static NTSTATUS samr_GetUserPwInfo(struct dcesrv_call_state *dce_call, TALLOC_CT ZERO_STRUCT(r->out.info); - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_USER); + DCESRV_PULL_HANDLE(h, r->in.user_handle, SAMR_HANDLE_USER); a_state = h->data; @@ -1932,7 +1932,7 @@ static NTSTATUS samr_QueryUserInfo2(struct dcesrv_call_state *dce_call, TALLOC_C struct samr_QueryUserInfo r1; NTSTATUS status; - r1.in.handle = r->in.handle; + r1.in.user_handle = r->in.user_handle; r1.in.level = r->in.level; status = samr_QueryUserInfo(dce_call, mem_ctx, &r1); @@ -2048,7 +2048,7 @@ static NTSTATUS samr_Connect2(struct dcesrv_call_state *dce_call, TALLOC_CTX *me c.in.system_name = NULL; c.in.access_mask = r->in.access_mask; - c.out.handle = r->out.handle; + c.out.connect_handle = r->out.connect_handle; return samr_Connect(dce_call, mem_ctx, &c); } @@ -2064,7 +2064,7 @@ static NTSTATUS samr_SetUserInfo2(struct dcesrv_call_state *dce_call, TALLOC_CTX { struct samr_SetUserInfo r2; - r2.in.handle = r->in.handle; + r2.in.user_handle = r->in.user_handle; r2.in.level = r->in.level; r2.in.info = r->in.info; @@ -2102,7 +2102,7 @@ static NTSTATUS samr_Connect3(struct dcesrv_call_state *dce_call, TALLOC_CTX *me c.in.system_name = NULL; c.in.access_mask = r->in.access_mask; - c.out.handle = r->out.handle; + c.out.connect_handle = r->out.connect_handle; return samr_Connect(dce_call, mem_ctx, &c); } @@ -2118,7 +2118,7 @@ static NTSTATUS samr_Connect4(struct dcesrv_call_state *dce_call, TALLOC_CTX *me c.in.system_name = NULL; c.in.access_mask = r->in.access_mask; - c.out.handle = r->out.handle; + c.out.connect_handle = r->out.connect_handle; return samr_Connect(dce_call, mem_ctx, &c); } @@ -2135,7 +2135,7 @@ static NTSTATUS samr_Connect5(struct dcesrv_call_state *dce_call, TALLOC_CTX *me c.in.system_name = NULL; c.in.access_mask = r->in.access_mask; - c.out.handle = r->out.handle; + c.out.connect_handle = r->out.connect_handle; status = samr_Connect(dce_call, mem_ctx, &c); diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c index 3347787425..5a6efc137b 100644 --- a/source4/rpc_server/samr/samr_password.c +++ b/source4/rpc_server/samr/samr_password.c @@ -39,7 +39,7 @@ NTSTATUS samr_ChangePasswordUser(struct dcesrv_call_state *dce_call, TALLOC_CTX NTSTATUS status = NT_STATUS_OK; const char * const attrs[] = { "lmPwdHash", "ntPwdHash" , "unicodePwd", NULL }; - DCESRV_PULL_HANDLE(h, r->in.handle, SAMR_HANDLE_USER); + DCESRV_PULL_HANDLE(h, r->in.user_handle, SAMR_HANDLE_USER); a_state = h->data; diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c index 1c164af333..d05390cb5a 100644 --- a/source4/torture/rpc/autoidl.c +++ b/source4/torture/rpc/autoidl.c @@ -34,7 +34,7 @@ static BOOL get_policy_handle(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.system_name = 0; r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - r.out.handle = handle; + r.out.connect_handle = handle; status = dcerpc_samr_Connect(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index cf44142d2d..4b335a19aa 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -72,7 +72,7 @@ static BOOL test_Shutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return True; } - r.in.handle = handle; + r.in.connect_handle = handle; printf("testing samr_Shutdown\n"); @@ -169,13 +169,13 @@ static BOOL test_SetUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, union samr_UserInfo u; BOOL ret = True; - s.in.handle = handle; + s.in.user_handle = handle; s.in.info = &u; - s2.in.handle = handle; + s2.in.user_handle = handle; s2.in.info = &u; - q.in.handle = handle; + q.in.user_handle = handle; q.out.info = &u; q0 = q; @@ -349,7 +349,7 @@ static BOOL test_SetUserPass(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, DATA_BLOB session_key; char *newpass = samr_rand_pass(mem_ctx); - s.in.handle = handle; + s.in.user_handle = handle; s.in.info = &u; s.in.level = 24; @@ -391,7 +391,7 @@ static BOOL test_SetUserPass_23(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, DATA_BLOB session_key; char *newpass = samr_rand_pass(mem_ctx); - s.in.handle = handle; + s.in.user_handle = handle; s.in.info = &u; s.in.level = 23; @@ -438,7 +438,7 @@ static BOOL test_SetUserPassEx(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, char *newpass = samr_rand_pass(mem_ctx); struct MD5Context ctx; - s.in.handle = handle; + s.in.user_handle = handle; s.in.info = &u; s.in.level = 26; @@ -489,7 +489,7 @@ static BOOL test_SetUserPass_25(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, char *newpass = samr_rand_pass(mem_ctx); struct MD5Context ctx; - s.in.handle = handle; + s.in.user_handle = handle; s.in.info = &u; s.in.level = 25; @@ -547,7 +547,7 @@ static BOOL test_SetAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, for (i=0;iname); @@ -1417,10 +1417,10 @@ static BOOL test_CreateUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, init_samr_Name(&name, TEST_ACCOUNT_NAME); - r.in.handle = domain_handle; + r.in.domain_handle = domain_handle; r.in.account_name = &name; r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - r.out.acct_handle = user_handle; + r.out.user_handle = user_handle; r.out.rid = &rid; printf("Testing CreateUser(%s)\n", r.in.account_name->name); @@ -1444,7 +1444,7 @@ static BOOL test_CreateUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return False; } - q.in.handle = user_handle; + q.in.user_handle = user_handle; q.in.level = 16; status = dcerpc_samr_QueryUserInfo(p, mem_ctx, &q); @@ -1505,8 +1505,8 @@ static BOOL test_DeleteUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("Testing DeleteUser\n"); - d.in.handle = user_handle; - d.out.handle = user_handle; + d.in.user_handle = user_handle; + d.out.user_handle = user_handle; status = dcerpc_samr_DeleteUser(p, mem_ctx, &d); if (!NT_STATUS_IS_OK(status)) { @@ -1524,7 +1524,7 @@ static BOOL test_CreateUser2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct samr_CreateUser2 r; struct samr_QueryUserInfo q; struct samr_DeleteUser d; - struct policy_handle acct_handle; + struct policy_handle user_handle; uint32_t rid; struct samr_Name name; BOOL ret = True; @@ -1558,11 +1558,11 @@ static BOOL test_CreateUser2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, init_samr_Name(&name, account_types[i].account_name); - r.in.handle = handle; + r.in.domain_handle = handle; r.in.account_name = &name; r.in.acct_flags = acct_flags; r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - r.out.acct_handle = &acct_handle; + r.out.user_handle = &user_handle; r.out.access_granted = &access_granted; r.out.rid = &rid; @@ -1588,7 +1588,7 @@ static BOOL test_CreateUser2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } if (NT_STATUS_IS_OK(status)) { - q.in.handle = &acct_handle; + q.in.user_handle = &user_handle; q.in.level = 16; status = dcerpc_samr_QueryUserInfo(p, mem_ctx, &q); @@ -1605,14 +1605,14 @@ static BOOL test_CreateUser2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, } } - if (!test_user_ops(p, mem_ctx, &acct_handle)) { + if (!test_user_ops(p, mem_ctx, &user_handle)) { ret = False; } printf("Testing DeleteUser (createuser2 test)\n"); - d.in.handle = &acct_handle; - d.out.handle = &acct_handle; + d.in.user_handle = &user_handle; + d.out.user_handle = &user_handle; status = dcerpc_samr_DeleteUser(p, mem_ctx, &d); if (!NT_STATUS_IS_OK(status)) { @@ -1637,7 +1637,7 @@ static BOOL test_QueryAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, for (i=0;icount; n.in.names = talloc(mem_ctx, r.out.sam->count * sizeof(struct samr_Name)); for (i=0;icount;i++) { @@ -1975,7 +1975,7 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("Testing LookupRids\n"); - lr.in.handle = handle; + lr.in.domain_handle = handle; lr.in.num_rids = r.out.sam->count; lr.in.rids = talloc(mem_ctx, r.out.sam->count * sizeof(uint32_t)); for (i=0;icount;i++) { @@ -2010,7 +2010,7 @@ static BOOL test_EnumDomainUsers_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ct printf("Testing EnumDomainUsers_async\n"); - r.in.handle = handle; + r.in.domain_handle = handle; r.in.resume_handle = &resume_handle; r.in.acct_flags = 0; r.in.max_size = (uint32_t)-1; @@ -2045,7 +2045,7 @@ static BOOL test_EnumDomainGroups(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("Testing EnumDomainGroups\n"); - r.in.handle = handle; + r.in.domain_handle = handle; r.in.resume_handle = &resume_handle; r.in.max_size = (uint32_t)-1; r.out.resume_handle = &resume_handle; @@ -2080,7 +2080,7 @@ static BOOL test_EnumDomainAliases(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, printf("Testing EnumDomainAliases\n"); - r.in.handle = handle; + r.in.domain_handle = handle; r.in.resume_handle = &resume_handle; r.in.account_flags = (uint32_t)-1; r.out.resume_handle = &resume_handle; @@ -2117,7 +2117,7 @@ static BOOL test_GetDisplayEnumerationIndex(struct dcerpc_pipe *p, TALLOC_CTX *m for (i=0;iname); /* check for correct error codes */ - r.in.handle = handle; + r.in.connect_handle = handle; r.in.domain = &n2; n2.name = NULL; @@ -2875,7 +2875,7 @@ static BOOL test_LookupDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, ret = False; } - r.in.handle = handle; + r.in.connect_handle = handle; r.in.domain = domain; status = dcerpc_samr_LookupDomain(p, mem_ctx, &r); @@ -2905,7 +2905,7 @@ static BOOL test_EnumDomains(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, int i; BOOL ret = True; - r.in.handle = handle; + r.in.connect_handle = handle; r.in.resume_handle = &resume_handle; r.in.buf_size = (uint32_t)-1; r.out.resume_handle = &resume_handle; @@ -2953,7 +2953,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r.in.system_name = 0; r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - r.out.handle = handle; + r.out.connect_handle = handle; status = dcerpc_samr_Connect(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { @@ -2965,7 +2965,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r2.in.system_name = NULL; r2.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - r2.out.handle = handle; + r2.out.connect_handle = handle; status = dcerpc_samr_Connect2(p, mem_ctx, &r2); if (!NT_STATUS_IS_OK(status)) { @@ -2978,7 +2978,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r3.in.system_name = NULL; r3.in.unknown = 0; r3.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - r3.out.handle = handle; + r3.out.connect_handle = handle; status = dcerpc_samr_Connect3(p, mem_ctx, &r3); if (!NT_STATUS_IS_OK(status)) { @@ -2991,7 +2991,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r4.in.system_name = ""; r4.in.unknown = 0; r4.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - r4.out.handle = handle; + r4.out.connect_handle = handle; status = dcerpc_samr_Connect4(p, mem_ctx, &r4); if (!NT_STATUS_IS_OK(status)) { @@ -3009,7 +3009,7 @@ static BOOL test_Connect(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, r5.in.level = 1; r5.in.info = &info; r5.out.info = &info; - r5.out.handle = handle; + r5.out.connect_handle = handle; status = dcerpc_samr_Connect5(p, mem_ctx, &r5); if (!NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c index 1467aeaad8..6fd80f5fa7 100644 --- a/source4/torture/rpc/svcctl.c +++ b/source4/torture/rpc/svcctl.c @@ -28,7 +28,6 @@ static BOOL test_EnumServicesStatus(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, NTSTATUS status; uint32 resume_handle = 0; struct ENUM_SERVICE_STATUS *service = NULL; - uint32 needed, sr; r.in.handle = h; r.in.type = SERVICE_TYPE_WIN32; diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c index 32ea6c5ce4..9cae85b658 100644 --- a/source4/torture/rpc/testjoin.c +++ b/source4/torture/rpc/testjoin.c @@ -31,7 +31,7 @@ struct test_join { TALLOC_CTX *mem_ctx; struct dcerpc_pipe *p; const char *machine_password; - struct policy_handle acct_handle; + struct policy_handle user_handle; }; @@ -40,7 +40,7 @@ static NTSTATUS DeleteUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, { NTSTATUS status; struct samr_DeleteUser d; - struct policy_handle acct_handle; + struct policy_handle user_handle; uint32_t rid; struct samr_LookupNames n; struct samr_Name sname; @@ -48,7 +48,7 @@ static NTSTATUS DeleteUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, sname.name = name; - n.in.handle = handle; + n.in.domain_handle = handle; n.in.num_names = 1; n.in.names = &sname; @@ -59,10 +59,10 @@ static NTSTATUS DeleteUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return status; } - r.in.handle = handle; + r.in.domain_handle = handle; r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; r.in.rid = rid; - r.out.acct_handle = &acct_handle; + r.out.user_handle = &user_handle; status = dcerpc_samr_OpenUser(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { @@ -70,8 +70,8 @@ static NTSTATUS DeleteUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, return status; } - d.in.handle = &acct_handle; - d.out.handle = &acct_handle; + d.in.user_handle = &user_handle; + d.out.user_handle = &user_handle; status = dcerpc_samr_DeleteUser(p, mem_ctx, &d); if (!NT_STATUS_IS_OK(status)) { return status; @@ -135,7 +135,7 @@ void *torture_join_domain(const char *machine_name, c.in.system_name = NULL; c.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - c.out.handle = &handle; + c.out.connect_handle = &handle; status = dcerpc_samr_Connect(join->p, mem_ctx, &c); if (!NT_STATUS_IS_OK(status)) { @@ -150,7 +150,7 @@ void *torture_join_domain(const char *machine_name, printf("Opening domain %s\n", domain); name.name = domain; - l.in.handle = &handle; + l.in.connect_handle = &handle; l.in.domain = &name; status = dcerpc_samr_LookupDomain(join->p, mem_ctx, &l); @@ -159,7 +159,7 @@ void *torture_join_domain(const char *machine_name, goto failed; } - o.in.handle = &handle; + o.in.connect_handle = &handle; o.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; o.in.sid = l.out.sid; o.out.domain_handle = &domain_handle; @@ -174,11 +174,11 @@ void *torture_join_domain(const char *machine_name, again: name.name = talloc_asprintf(mem_ctx, "%s$", machine_name); - r.in.handle = &domain_handle; + r.in.domain_handle = &domain_handle; r.in.account_name = &name; r.in.acct_flags = acct_flags; r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED; - r.out.acct_handle = &join->acct_handle; + r.out.user_handle = &join->user_handle; r.out.access_granted = &access_granted; r.out.rid = &rid; @@ -196,7 +196,7 @@ again: goto failed; } - pwp.in.handle = &join->acct_handle; + pwp.in.user_handle = &join->user_handle; status = dcerpc_samr_GetUserPwInfo(join->p, mem_ctx, &pwp); if (NT_STATUS_IS_OK(status)) { @@ -207,7 +207,7 @@ again: printf("Setting machine account password '%s'\n", join->machine_password); - s.in.handle = &join->acct_handle; + s.in.user_handle = &join->user_handle; s.in.info = &u; s.in.level = 24; @@ -230,7 +230,7 @@ again: goto failed; } - s.in.handle = &join->acct_handle; + s.in.user_handle = &join->user_handle; s.in.info = &u; s.in.level = 16; @@ -263,9 +263,9 @@ void torture_leave_domain(void *join_ctx) struct samr_DeleteUser d; NTSTATUS status; - if (!uuid_all_zero(&join->acct_handle.uuid)) { - d.in.handle = &join->acct_handle; - d.out.handle = &join->acct_handle; + if (!uuid_all_zero(&join->user_handle.uuid)) { + d.in.user_handle = &join->user_handle; + d.out.user_handle = &join->user_handle; status = dcerpc_samr_DeleteUser(join->p, join->mem_ctx, &d); if (!NT_STATUS_IS_OK(status)) { -- cgit