diff options
author | Tim Potter <tpot@samba.org> | 2000-12-13 12:39:55 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2000-12-13 12:39:55 +0000 |
commit | ed6f6ca043a5a5cc5af9b80894abab82d9ce8d71 (patch) | |
tree | 585f0f0be0be793e238560b3ff6b9ace093a714c /source3/rpc_server | |
parent | 6de135b0b2a9face6d1f5c1300c1a1ff4b68e251 (diff) | |
download | samba-ed6f6ca043a5a5cc5af9b80894abab82d9ce8d71.tar.gz samba-ed6f6ca043a5a5cc5af9b80894abab82d9ce8d71.tar.bz2 samba-ed6f6ca043a5a5cc5af9b80894abab82d9ce8d71.zip |
Server side changes for dynamic names in lsa_lookup_names
(This used to be commit 5c5c3a8a08efe8c2f36a55b1383e9d3dd9eca4a5)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_lsa.c b/source3/rpc_server/srv_lsa.c index 38f4936209..5bc780860f 100644 --- a/source3/rpc_server/srv_lsa.c +++ b/source3/rpc_server/srv_lsa.c @@ -402,13 +402,17 @@ static BOOL lsa_reply_lookup_sids(prs_struct *rdata, DOM_SID2 *sid, int num_entr lsa_reply_lookup_names ***************************************************************************/ -static BOOL lsa_reply_lookup_names(prs_struct *rdata, - UNISTR2 names[MAX_LOOKUP_SIDS], int num_entries) +static BOOL lsa_reply_lookup_names(prs_struct *rdata, UNISTR2 *names, + int num_entries) { LSA_R_LOOKUP_NAMES r_l; DOM_R_REF ref; DOM_RID2 rids[MAX_LOOKUP_SIDS]; uint32 mapped_count = 0; + TALLOC_CTX *mem_ctx = talloc_init(); + BOOL result = True; + + if (!mem_ctx) return False; ZERO_STRUCT(r_l); ZERO_STRUCT(ref); @@ -419,12 +423,13 @@ static BOOL lsa_reply_lookup_names(prs_struct *rdata, init_reply_lookup_names(&r_l, &ref, num_entries, rids, mapped_count); /* store the response in the SMB stream */ - if(!lsa_io_r_lookup_names("", &r_l, rdata, 0)) { + if(!lsa_io_r_lookup_names(mem_ctx, "", &r_l, rdata, 0)) { DEBUG(0,("lsa_reply_lookup_names: Failed to marshall LSA_R_LOOKUP_NAMES.\n")); - return False; + result = False; } - return True; + talloc_destroy(mem_ctx); + return result; } /*************************************************************************** |