summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libnet/libnet_passwd.c20
-rw-r--r--source4/librpc/idl/samr.idl130
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c74
-rw-r--r--source4/rpc_server/samr/samr_password.c2
-rw-r--r--source4/torture/rpc/autoidl.c2
-rw-r--r--source4/torture/rpc/samr.c228
-rw-r--r--source4/torture/rpc/svcctl.c1
-rw-r--r--source4/torture/rpc/testjoin.c36
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;i<ARRAY_SIZE(levels);i++) {
printf("Testing SetAliasInfo level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.alias_handle = handle;
r.in.level = levels[i];
switch (r.in.level) {
case 2 : init_samr_Name(&r.in.info.name,TEST_ALIASNAME); break;
@@ -562,7 +562,7 @@ static BOOL test_SetAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = False;
}
- q.in.handle = handle;
+ q.in.alias_handle = handle;
q.in.level = levels[i];
status = dcerpc_samr_QueryAliasInfo(p, mem_ctx, &q);
@@ -585,7 +585,7 @@ static BOOL test_GetGroupsForUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("testing GetGroupsForUser\n");
- r.in.handle = user_handle;
+ r.in.user_handle = user_handle;
status = dcerpc_samr_GetGroupsForUser(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -653,7 +653,7 @@ static BOOL test_GetUserPwInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing GetUserPwInfo\n");
- r.in.handle = handle;
+ r.in.user_handle = handle;
status = dcerpc_samr_GetUserPwInfo(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -674,7 +674,7 @@ static NTSTATUS test_LookupName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
init_samr_Name(&sname[0], name);
- n.in.handle = domain_handle;
+ n.in.domain_handle = domain_handle;
n.in.num_names = 1;
n.in.names = sname;
status = dcerpc_samr_LookupNames(p, mem_ctx, &n);
@@ -715,10 +715,10 @@ static NTSTATUS test_OpenUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return status;
}
- r.in.handle = domain_handle;
+ r.in.domain_handle = domain_handle;
r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
r.in.rid = rid;
- r.out.acct_handle = user_handle;
+ r.out.user_handle = user_handle;
status = dcerpc_samr_OpenUser(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("OpenUser_byname(%s) failed - %s\n", name, nt_errstr(status));
@@ -821,7 +821,7 @@ static BOOL test_ChangePasswordUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
E_old_pw_hash(old_lm_hash, new_nt_hash, hash5.hash);
E_old_pw_hash(old_nt_hash, new_lm_hash, hash6.hash);
- r.in.handle = &user_handle;
+ r.in.user_handle = &user_handle;
r.in.lm_present = 1;
r.in.old_lm_crypted = &hash1;
r.in.new_lm_crypted = &hash2;
@@ -1008,7 +1008,7 @@ static BOOL test_GetMembersInAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing GetMembersInAlias\n");
- r.in.handle = alias_handle;
+ r.in.alias_handle = alias_handle;
r.out.sids = &sids;
status = dcerpc_samr_GetMembersInAlias(p, mem_ctx, &r);
@@ -1035,7 +1035,7 @@ static BOOL test_AddMemberToAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
sid = dom_sid_add_rid(mem_ctx, domain_sid, 512);
printf("testing AddAliasMember\n");
- r.in.handle = alias_handle;
+ r.in.alias_handle = alias_handle;
r.in.sid = sid;
status = dcerpc_samr_AddAliasMember(p, mem_ctx, &r);
@@ -1044,7 +1044,7 @@ static BOOL test_AddMemberToAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = False;
}
- d.in.handle = alias_handle;
+ d.in.alias_handle = alias_handle;
d.in.sid = sid;
status = dcerpc_samr_DeleteAliasMember(p, mem_ctx, &d);
@@ -1066,7 +1066,7 @@ static BOOL test_AddMultipleMembersToAlias(struct dcerpc_pipe *p, TALLOC_CTX *me
struct lsa_SidArray sids;
printf("testing AddMultipleMembersToAlias\n");
- a.in.handle = alias_handle;
+ a.in.alias_handle = alias_handle;
a.in.sids = &sids;
sids.num_sids = 3;
@@ -1084,7 +1084,7 @@ static BOOL test_AddMultipleMembersToAlias(struct dcerpc_pipe *p, TALLOC_CTX *me
printf("testing RemoveMultipleMembersFromAlias\n");
- r.in.handle = alias_handle;
+ r.in.alias_handle = alias_handle;
r.in.sids = &sids;
status = dcerpc_samr_RemoveMultipleMembersFromAlias(p, mem_ctx, &r);
@@ -1121,7 +1121,7 @@ static BOOL test_TestPrivateFunctionsUser(struct dcerpc_pipe *p, TALLOC_CTX *mem
printf("Testing TestPrivateFunctionsUser\n");
- r.in.handle = user_handle;
+ r.in.user_handle = user_handle;
status = dcerpc_samr_TestPrivateFunctionsUser(p, mem_ctx, &r);
if (!NT_STATUS_EQUAL(NT_STATUS_NOT_IMPLEMENTED, status)) {
@@ -1202,7 +1202,7 @@ BOOL test_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;
status = test_LookupName(p, mem_ctx, handle, name, &rid);
@@ -1210,13 +1210,13 @@ BOOL test_DeleteUser_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
goto failed;
}
- status = test_OpenUser_byname(p, mem_ctx, handle, name, &acct_handle);
+ status = test_OpenUser_byname(p, mem_ctx, handle, name, &user_handle);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
}
- 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)) {
goto failed;
@@ -1244,17 +1244,17 @@ static BOOL test_DeleteGroup_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
goto failed;
}
- 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 = &group_handle;
+ r.out.group_handle = &group_handle;
status = dcerpc_samr_OpenGroup(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
}
- d.in.handle = &group_handle;
- d.out.handle = &group_handle;
+ d.in.group_handle = &group_handle;
+ d.out.group_handle = &group_handle;
status = dcerpc_samr_DeleteDomainGroup(p, mem_ctx, &d);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
@@ -1284,17 +1284,17 @@ static BOOL test_DeleteAlias_byname(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
goto failed;
}
- r.in.handle = domain_handle;
+ r.in.domain_handle = domain_handle;
r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
r.in.rid = rid;
- r.out.acct_handle = &alias_handle;
+ r.out.alias_handle = &alias_handle;
status = dcerpc_samr_OpenAlias(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
}
- d.in.handle = &alias_handle;
- d.out.handle = &alias_handle;
+ d.in.alias_handle = &alias_handle;
+ d.out.alias_handle = &alias_handle;
status = dcerpc_samr_DeleteDomAlias(p, mem_ctx, &d);
if (!NT_STATUS_IS_OK(status)) {
goto failed;
@@ -1315,8 +1315,8 @@ static BOOL test_DeleteAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
BOOL ret = True;
printf("Testing DeleteAlias\n");
- d.in.handle = alias_handle;
- d.out.handle = alias_handle;
+ d.in.alias_handle = alias_handle;
+ d.out.alias_handle = alias_handle;
status = dcerpc_samr_DeleteDomAlias(p, mem_ctx, &d);
if (!NT_STATUS_IS_OK(status)) {
@@ -1339,10 +1339,10 @@ static BOOL test_CreateAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
BOOL ret = True;
init_samr_Name(&name, TEST_ALIASNAME);
- r.in.handle = domain_handle;
+ r.in.domain_handle = domain_handle;
r.in.aliasname = &name;
r.in.access_mask = SEC_RIGHT_MAXIMUM_ALLOWED;
- r.out.acct_handle = alias_handle;
+ r.out.alias_handle = alias_handle;
r.out.rid = &rid;
printf("Testing CreateAlias (%s)\n", r.in.aliasname->name);
@@ -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;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryAliasInfo level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.alias_handle = handle;
r.in.level = levels[i];
status = dcerpc_samr_QueryAliasInfo(p, mem_ctx, &r);
@@ -1663,7 +1663,7 @@ static BOOL test_QueryGroupInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryGroupInfo level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.group_handle = handle;
r.in.level = levels[i];
status = dcerpc_samr_QueryGroupInfo(p, mem_ctx, &r);
@@ -1692,7 +1692,7 @@ static BOOL test_SetGroupInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryGroupInfo level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.group_handle = handle;
r.in.level = levels[i];
status = dcerpc_samr_QueryGroupInfo(p, mem_ctx, &r);
@@ -1704,7 +1704,7 @@ static BOOL test_SetGroupInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing SetGroupInfo level %u\n", levels[i]);
- s.in.handle = handle;
+ s.in.group_handle = handle;
s.in.level = levels[i];
s.in.info = r.out.info;
@@ -1756,7 +1756,7 @@ static BOOL test_QueryUserInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryUserInfo level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.user_handle = handle;
r.in.level = levels[i];
status = dcerpc_samr_QueryUserInfo(p, mem_ctx, &r);
@@ -1783,7 +1783,7 @@ static BOOL test_QueryUserInfo2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryUserInfo2 level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.user_handle = handle;
r.in.level = levels[i];
status = dcerpc_samr_QueryUserInfo2(p, mem_ctx, &r);
@@ -1802,15 +1802,15 @@ static BOOL test_OpenUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_OpenUser r;
- struct policy_handle acct_handle;
+ struct policy_handle user_handle;
BOOL ret = True;
printf("Testing OpenUser(%u)\n", rid);
- 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)) {
@@ -1818,27 +1818,27 @@ static BOOL test_OpenUser(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- if (!test_QuerySecurity(p, mem_ctx, &acct_handle)) {
+ if (!test_QuerySecurity(p, mem_ctx, &user_handle)) {
ret = False;
}
- if (!test_QueryUserInfo(p, mem_ctx, &acct_handle)) {
+ if (!test_QueryUserInfo(p, mem_ctx, &user_handle)) {
ret = False;
}
- if (!test_QueryUserInfo2(p, mem_ctx, &acct_handle)) {
+ if (!test_QueryUserInfo2(p, mem_ctx, &user_handle)) {
ret = False;
}
- if (!test_GetUserPwInfo(p, mem_ctx, &acct_handle)) {
+ if (!test_GetUserPwInfo(p, mem_ctx, &user_handle)) {
ret = False;
}
- if (!test_GetGroupsForUser(p,mem_ctx, &acct_handle)) {
+ if (!test_GetGroupsForUser(p,mem_ctx, &user_handle)) {
ret = False;
}
- if (!test_Close(p, mem_ctx, &acct_handle)) {
+ if (!test_Close(p, mem_ctx, &user_handle)) {
ret = False;
}
@@ -1850,15 +1850,15 @@ static BOOL test_OpenGroup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_OpenGroup r;
- struct policy_handle acct_handle;
+ struct policy_handle group_handle;
BOOL ret = True;
printf("Testing OpenGroup(%u)\n", rid);
- 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.group_handle = &group_handle;
status = dcerpc_samr_OpenGroup(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -1866,15 +1866,15 @@ static BOOL test_OpenGroup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- if (!test_QuerySecurity(p, mem_ctx, &acct_handle)) {
+ if (!test_QuerySecurity(p, mem_ctx, &group_handle)) {
ret = False;
}
- if (!test_QueryGroupInfo(p, mem_ctx, &acct_handle)) {
+ if (!test_QueryGroupInfo(p, mem_ctx, &group_handle)) {
ret = False;
}
- if (!test_Close(p, mem_ctx, &acct_handle)) {
+ if (!test_Close(p, mem_ctx, &group_handle)) {
ret = False;
}
@@ -1886,15 +1886,15 @@ static BOOL test_OpenAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
{
NTSTATUS status;
struct samr_OpenAlias r;
- struct policy_handle acct_handle;
+ struct policy_handle alias_handle;
BOOL ret = True;
printf("Testing OpenAlias(%u)\n", rid);
- 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.alias_handle = &alias_handle;
status = dcerpc_samr_OpenAlias(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -1902,19 +1902,19 @@ static BOOL test_OpenAlias(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- if (!test_QuerySecurity(p, mem_ctx, &acct_handle)) {
+ if (!test_QuerySecurity(p, mem_ctx, &alias_handle)) {
ret = False;
}
- if (!test_QueryAliasInfo(p, mem_ctx, &acct_handle)) {
+ if (!test_QueryAliasInfo(p, mem_ctx, &alias_handle)) {
ret = False;
}
- if (!test_GetMembersInAlias(p, mem_ctx, &acct_handle)) {
+ if (!test_GetMembersInAlias(p, mem_ctx, &alias_handle)) {
ret = False;
}
- if (!test_Close(p, mem_ctx, &acct_handle)) {
+ if (!test_Close(p, mem_ctx, &alias_handle)) {
ret = False;
}
@@ -1934,7 +1934,7 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing EnumDomainUsers\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;
@@ -1961,7 +1961,7 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
printf("Testing LookupNames\n");
- n.in.handle = handle;
+ n.in.domain_handle = handle;
n.in.num_names = r.out.sam->count;
n.in.names = talloc(mem_ctx, r.out.sam->count * sizeof(struct samr_Name));
for (i=0;i<r.out.sam->count;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;i<r.out.sam->count;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;i<ARRAY_SIZE(levels);i++) {
printf("Testing GetDisplayEnumerationIndex level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.domain_handle = handle;
r.in.level = levels[i];
init_samr_Name(&r.in.name, TEST_ACCOUNT_NAME);
@@ -2158,7 +2158,7 @@ static BOOL test_GetDisplayEnumerationIndex2(struct dcerpc_pipe *p, TALLOC_CTX *
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing GetDisplayEnumerationIndex2 level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.domain_handle = handle;
r.in.level = levels[i];
init_samr_Name(&r.in.name, TEST_ACCOUNT_NAME);
@@ -2196,7 +2196,7 @@ static BOOL test_QueryDisplayInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryDisplayInfo level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.domain_handle = handle;
r.in.level = levels[i];
r.in.start_idx = 0;
r.in.max_entries = 1000;
@@ -2225,7 +2225,7 @@ static BOOL test_QueryDisplayInfo2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryDisplayInfo2 level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.domain_handle = handle;
r.in.level = levels[i];
r.in.start_idx = 0;
r.in.max_entries = 1000;
@@ -2254,7 +2254,7 @@ static BOOL test_QueryDisplayInfo3(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryDisplayInfo3 level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.domain_handle = handle;
r.in.level = levels[i];
r.in.start_idx = 0;
r.in.max_entries = 1000;
@@ -2285,7 +2285,7 @@ static BOOL test_QueryDomainInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryDomainInfo level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.domain_handle = handle;
r.in.level = levels[i];
status = dcerpc_samr_QueryDomainInfo(p, mem_ctx, &r);
@@ -2298,7 +2298,7 @@ static BOOL test_QueryDomainInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing SetDomainInfo level %u\n", levels[i]);
- s.in.handle = handle;
+ s.in.domain_handle = handle;
s.in.level = levels[i];
s.in.info = r.out.info;
@@ -2344,7 +2344,7 @@ static BOOL test_QueryDomainInfo2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
for (i=0;i<ARRAY_SIZE(levels);i++) {
printf("Testing QueryDomainInfo2 level %u\n", levels[i]);
- r.in.handle = handle;
+ r.in.domain_handle = handle;
r.in.level = levels[i];
status = dcerpc_samr_QueryDomainInfo2(p, mem_ctx, &r);
@@ -2376,7 +2376,7 @@ static BOOL test_GroupList(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing coherency of querydispinfo vs enumdomgroups\n");
- q1.in.handle = handle;
+ q1.in.domain_handle = handle;
q1.in.resume_handle = &resume_handle;
q1.in.max_size = 5;
q1.out.resume_handle = &resume_handle;
@@ -2405,7 +2405,7 @@ static BOOL test_GroupList(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- q2.in.handle = handle;
+ q2.in.domain_handle = handle;
q2.in.level = 5;
q2.in.start_idx = 0;
q2.in.max_entries = 5;
@@ -2480,8 +2480,8 @@ static BOOL test_DeleteDomainGroup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing DeleteDomainGroup\n");
- d.in.handle = group_handle;
- d.out.handle = group_handle;
+ d.in.group_handle = group_handle;
+ d.out.group_handle = group_handle;
status = dcerpc_samr_DeleteDomainGroup(p, mem_ctx, &d);
if (!NT_STATUS_IS_OK(status)) {
@@ -2501,7 +2501,7 @@ static BOOL test_TestPrivateFunctionsDomain(struct dcerpc_pipe *p, TALLOC_CTX *m
printf("Testing TestPrivateFunctionsDomain\n");
- r.in.handle = domain_handle;
+ r.in.domain_handle = domain_handle;
status = dcerpc_samr_TestPrivateFunctionsDomain(p, mem_ctx, &r);
if (!NT_STATUS_EQUAL(NT_STATUS_NOT_IMPLEMENTED, status)) {
@@ -2521,7 +2521,7 @@ static BOOL test_RidToSid(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing RidToSid\n");
- r.in.handle = domain_handle;
+ r.in.domain_handle = domain_handle;
r.in.rid = 512;
status = dcerpc_samr_RidToSid(p, mem_ctx, &r);
@@ -2542,7 +2542,7 @@ static BOOL test_GetBootKeyInformation(struct dcerpc_pipe *p, TALLOC_CTX *mem_ct
printf("Testing GetBootKeyInformation\n");
- r.in.handle = domain_handle;
+ r.in.domain_handle = domain_handle;
status = dcerpc_samr_GetBootKeyInformation(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -2570,13 +2570,13 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- r.in.handle = group_handle;
+ r.in.group_handle = group_handle;
r.in.rid = rid;
r.in.flags = 0; /* ??? */
printf("Testing AddGroupMember and DeleteGroupMember\n");
- d.in.handle = group_handle;
+ d.in.group_handle = group_handle;
d.in.rid = rid;
status = dcerpc_samr_DeleteGroupMember(p, mem_ctx, &d);
@@ -2601,7 +2601,7 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
/* this one is quite strange. I am using random inputs in the
hope of triggering an error that might give us a clue */
- s.in.handle = group_handle;
+ s.in.group_handle = group_handle;
s.in.unknown1 = random();
s.in.unknown2 = random();
@@ -2611,7 +2611,7 @@ static BOOL test_AddGroupMember(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return False;
}
- q.in.handle = group_handle;
+ q.in.group_handle = group_handle;
status = dcerpc_samr_QueryGroupMember(p, mem_ctx, &q);
if (!NT_STATUS_IS_OK(status)) {
@@ -2646,7 +2646,7 @@ static BOOL test_CreateDomainGroup(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
init_samr_Name(&name, TEST_GROUPNAME);
- r.in.handle = domain_handle;
+ r.in.domain_handle = domain_handle;
r.in.name = &name;
r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
r.out.group_handle = group_handle;
@@ -2696,7 +2696,7 @@ static BOOL test_RemoveMemberFromForeignDomain(struct dcerpc_pipe *p,
NTSTATUS status;
struct samr_RemoveMemberFromForeignDomain r;
- r.in.handle = domain_handle;
+ r.in.domain_handle = domain_handle;
r.in.sid = dom_sid_parse_talloc(mem_ctx, "S-1-5-32-12-34-56-78-9");
status = dcerpc_samr_RemoveMemberFromForeignDomain(p, mem_ctx, &r);
@@ -2729,7 +2729,7 @@ static BOOL test_OpenDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing OpenDomain\n");
- r.in.handle = handle;
+ r.in.connect_handle = handle;
r.in.access_mask = SEC_RIGHTS_MAXIMUM_ALLOWED;
r.in.sid = sid;
r.out.domain_handle = &domain_handle;
@@ -2857,7 +2857,7 @@ static BOOL test_LookupDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing LookupDomain(%s)\n", domain->name);
/* 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)) {