summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-07 09:29:56 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-07 09:29:56 +0000
commit04858cd7025bb4c3fdb34a2795568a6b52004c3b (patch)
tree405959e69024b06059dbd79fb3621ac2435b12d4 /source3
parent80087e6cfed8f6aa55ed396e1690dff2dc32ece7 (diff)
downloadsamba-04858cd7025bb4c3fdb34a2795568a6b52004c3b.tar.gz
samba-04858cd7025bb4c3fdb34a2795568a6b52004c3b.tar.bz2
samba-04858cd7025bb4c3fdb34a2795568a6b52004c3b.zip
Limit the number of SIDs that may be looked up, in line with existing code
for name->sid. (This used to be commit 0ebccc0dbeecc10d423529909a2563fbc3bf9857)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 1b42c5f141..fb6538db39 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -641,6 +641,11 @@ NTSTATUS _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_
LSA_TRANS_NAME_ENUM *names = NULL;
uint32 mapped_count = 0;
+ if (num_entries > MAX_LOOKUP_SIDS) {
+ num_entries = MAX_LOOKUP_SIDS;
+ DEBUG(5,("_lsa_lookup_sids: truncating SID lookup list to %d\n", num_entries));
+ }
+
ref = (DOM_R_REF *)talloc_zero(p->mem_ctx, sizeof(DOM_R_REF));
names = (LSA_TRANS_NAME_ENUM *)talloc_zero(p->mem_ctx, sizeof(LSA_TRANS_NAME_ENUM));