From: Günther Deschner Date: Tue, 20 Oct 2009 13:12:58 +0000 (+0200) Subject: s3-lsa: When looking up domains in LookupNames, do not strip the sid. X-Git-Tag: tdb-1.2.0~616 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=18dd62616028cf202f63a12c20d5e21e390451b6 s3-lsa: When looking up domains in LookupNames, do not strip the sid. Found by RPC-LSA-LOOKUPNAMES torture test. Guenther --- diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index c5805ef3d4b..a3a1218956e 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -195,7 +195,11 @@ static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx, dom_idx = -1; if (type != SID_NAME_UNKNOWN) { - sid_split_rid(&sid, &rid); + if (type == SID_NAME_DOMAIN) { + rid = (uint32_t)-1; + } else { + sid_split_rid(&sid, &rid); + } dom_idx = init_lsa_ref_domain_list(mem_ctx, ref, domain, &sid); mapped_count++; }