diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_client/cli_samr.c | 5 | ||||
-rw-r--r-- | source3/rpc_client/cli_samr.h | 21 | ||||
-rw-r--r-- | source3/rpcclient/cmd_samr.c | 2 | ||||
-rw-r--r-- | source3/utils/net_rpc.c | 4 | ||||
-rw-r--r-- | source3/winbindd/winbindd_rpc.c | 6 |
5 files changed, 28 insertions, 10 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index b046780890..79cc757d00 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -390,8 +390,9 @@ NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli, with large (10k and higher) numbers of users. These values were obtained by inspection using ethereal and NT4 running User Manager. */ -void get_query_dispinfo_params(int loop_count, uint32 *max_entries, - uint32 *max_size) +void dcerpc_get_query_dispinfo_params(int loop_count, + uint32_t *max_entries, + uint32_t *max_size) { switch(loop_count) { case 0: diff --git a/source3/rpc_client/cli_samr.h b/source3/rpc_client/cli_samr.h index 70d0c8b7ff..18e6328bba 100644 --- a/source3/rpc_client/cli_samr.h +++ b/source3/rpc_client/cli_samr.h @@ -174,8 +174,25 @@ NTSTATUS rpccli_samr_chgpasswd_user3(struct rpc_pipe_client *cli, const char *oldpassword, struct samr_DomInfo1 **dominfo1, struct userPwdChangeFailureInformation **reject); -void get_query_dispinfo_params(int loop_count, uint32 *max_entries, - uint32 *max_size); + +/** + * @brief Create a set of max_entries, max_size for QueryDisplayInfo. + * + * This function returns a set of (max_entries, max_size) required + * for the QueryDisplayInfo RPC to actually work against a domain controller + * with large (10k and higher) numbers of users. These values were + * obtained by inspection using wireshark and NT4 running User Manager. + * + * @param[in] loop_count The loop count. + * + * @param[out] max_entries A pointer to store maximum entries value. + * + * @param[out] max_size A poiter to store the maximum size value. + */ +void dcerpc_get_query_dispinfo_params(int loop_count, + uint32_t *max_entries, + uint32_t *max_size); + NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t access_mask, diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index 5f5819fdf9..0d72bd01a2 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -1400,7 +1400,7 @@ static NTSTATUS cmd_samr_query_dispinfo_internal(struct rpc_pipe_client *cli, do { if (!got_params) - get_query_dispinfo_params( + dcerpc_get_query_dispinfo_params( loop_count, &max_entries, &max_size); switch (opcode) { diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 6bebd49020..158e4d501a 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -952,7 +952,7 @@ static int rpc_user_list(struct net_context *c, int argc, const char **argv) do { uint32_t max_entries, max_size; - get_query_dispinfo_params( + dcerpc_get_query_dispinfo_params( loop_count, &max_entries, &max_size); status = NetQueryDisplayInformation(c->opt_host, @@ -2348,7 +2348,7 @@ static NTSTATUS rpc_group_list_internals(struct net_context *c, if (!global) break; - get_query_dispinfo_params( + dcerpc_get_query_dispinfo_params( loop_count, &max_entries, &max_size); result = rpccli_samr_QueryDisplayInfo(pipe_hnd, mem_ctx, diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c index 47d8f34e1b..54bb30b1ab 100644 --- a/source3/winbindd/winbindd_rpc.c +++ b/source3/winbindd/winbindd_rpc.c @@ -59,9 +59,9 @@ NTSTATUS rpc_query_user_list(TALLOC_CTX *mem_ctx, uint32_t total_size, returned_size; union samr_DispInfo disp_info; - get_query_dispinfo_params(loop_count, - &max_entries, - &max_size); + dcerpc_get_query_dispinfo_params(loop_count, + &max_entries, + &max_size); status = rpccli_samr_QueryDisplayInfo(samr_pipe, mem_ctx, |