r23070: The lsa rpc lookup sids call has a maximum number of SIDS to be
authorMichael Adam <obnox@samba.org>
Tue, 22 May 2007 11:30:35 +0000 (11:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:22:18 +0000 (12:22 -0500)
commit87d30dc32d06ce20e091b9d482af126780a9e4b7
tree903a41b6dd8504d0a8e3c85374d9cb21a6cc0d72
parent6bb0eb1bf855f77a553879ded93e6bf81688a5ef
r23070: The lsa rpc lookup sids call has a maximum number of SIDS to be
looked up at one time. This limit is at 20480 for w2k3.
Our rpccli_lsa_lookup_sids function ignores this limit, so when
we give the server too long a list of SIDs, then we will get
nothing back. Since typically rpccli_lsa_lookup_sids is given
one SID  (or a small number of SIDS), this did not do harm
up to now. But since I want to use lsa_lookup_sids in a subsequent
modification to winbindd_ads.c:lookup_groupmem to get rid of
a vast number of dn_lookup calls to the server, I had to make
sure we do it correctly.

I have added a function rpccli_lsa_lookup_sids_all function
that has the same prototype but internally splits the list
of SIDs up into hunks of a (conservative, hard coded) 1000
SIDs each for a first go.

If this approach is agreed upon, the new function could replace
the original rpccli_lsa_lookup_sids function.

Michael
(This used to be commit 66ff0bc6c39f86a9830dc508cd891e33638b475d)
source3/rpc_client/cli_lsarpc.c