diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-07-22 19:44:17 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:19 -0500 |
commit | e85be720a39c10724d5b6e50f794f5cf36648c2a (patch) | |
tree | e9c11a8d7dd2f52e10b717c312abd66ffcaf7f59 /source3/rpc_server | |
parent | e5b6fea73eff8f30fb48d04cb0ec55b0abe95dca (diff) | |
download | samba-e85be720a39c10724d5b6e50f794f5cf36648c2a.tar.gz samba-e85be720a39c10724d5b6e50f794f5cf36648c2a.tar.bz2 samba-e85be720a39c10724d5b6e50f794f5cf36648c2a.zip |
r17192: Make this actually survive valgrind. We NEED pidl here...
Maybe bzr is not such a bad idea, then you would probably see less spam on
samba-cvs, sorry for that... :-)
Volker
(This used to be commit 41456b498a181c70707ca1ea80288bd7bdcadcdf)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index f458f68b74..e609eac950 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -1015,8 +1015,8 @@ NTSTATUS _lsa_lookup_sids3(pipes_struct *p, LSA_R_LOOKUP_SIDS3 *r_u) { uint32 mapped_count = 0; - DOM_R_REF ref; - LSA_TRANS_NAME_ENUM2 names; + DOM_R_REF *ref; + LSA_TRANS_NAME_ENUM2 *names; if ((q_u->level < 1) || (q_u->level > 6)) { return NT_STATUS_INVALID_PARAMETER; @@ -1024,9 +1024,16 @@ NTSTATUS _lsa_lookup_sids3(pipes_struct *p, r_u->status = NT_STATUS_RPC_PROTSEQ_NOT_SUPPORTED; - ZERO_STRUCT(ref); - ZERO_STRUCT(names); - init_reply_lookup_sids3(r_u, &ref, &names, mapped_count); + ref = TALLOC_ZERO_P(p->mem_ctx, DOM_R_REF); + names = TALLOC_ZERO_P(p->mem_ctx, LSA_TRANS_NAME_ENUM2); + + if ((ref == NULL) || (names == NULL)) { + /* We would segfault later on in lsa_io_r_lookup_sids3 anyway, + * so do a planned exit here. We NEEEED pidl! */ + smb_panic("talloc failed"); + } + + init_reply_lookup_sids3(r_u, ref, names, mapped_count); return r_u->status; } |