diff options
author | Jeremy Allison <jra@samba.org> | 2003-01-29 20:15:35 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-01-29 20:15:35 +0000 |
commit | f8601187caac93c5b03b2a5c6f06c674291a0a17 (patch) | |
tree | b7bc3f4c54051f8e8bf1be57b7dc7c2222d466c7 /source3/rpc_client | |
parent | aed54afc2cfc468d29b65b2b503d975070515528 (diff) | |
download | samba-f8601187caac93c5b03b2a5c6f06c674291a0a17.tar.gz samba-f8601187caac93c5b03b2a5c6f06c674291a0a17.tar.bz2 samba-f8601187caac93c5b03b2a5c6f06c674291a0a17.zip |
Merge tpot's changes to request the correct sizes for user dispinfo
from HEAD. I had to do this for him as he was *so* tired, the poor
chap, plus he has this bad leg, plus the dog ate his homework etc. etc.
Jeremy.
(This used to be commit 1e752b48a12cdcf2cb6343705be83f304e5ee2b6)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_samr.c | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index d101b8fe21..f0035ca22e 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -961,12 +961,45 @@ NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/* This function returns the bizzare 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 ethereal and NT4 running User Manager. */ + +void get_query_dispinfo_params(int loop_count, uint32 *max_entries, + uint32 *max_size) +{ + switch(loop_count) { + case 0: + *max_entries = 512; + *max_size = 16383; + break; + case 1: + *max_entries = 1024; + *max_size = 32766; + break; + case 2: + *max_entries = 2048; + *max_size = 65532; + break; + case 3: + *max_entries = 4096; + *max_size = 131064; + break; + default: /* loop_count >= 4 */ + *max_entries = 4096; + *max_size = 131071; + break; + } +} + /* Query display info */ NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, POLICY_HND *domain_pol, uint32 *start_idx, uint16 switch_value, uint32 *num_entries, - uint32 max_entries, SAM_DISPINFO_CTR *ctr) + uint32 max_entries, uint32 max_size, + SAM_DISPINFO_CTR *ctr) { prs_struct qbuf, rbuf; SAMR_Q_QUERY_DISPINFO q; @@ -984,7 +1017,7 @@ NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx, /* Marshall data and send request */ init_samr_q_query_dispinfo(&q, domain_pol, switch_value, - *start_idx, max_entries); + *start_idx, max_entries, max_size); if (!samr_io_q_query_dispinfo("", &q, &qbuf, 0) || !rpc_api_pipe_req(cli, SAMR_QUERY_DISPINFO, &qbuf, &rbuf)) { |