diff options
author | Gregor Beck <gbeck@sernet.de> | 2014-02-20 13:14:31 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-02-21 15:59:28 +0100 |
commit | 3413e64149702136429d7b5acaa7a52c49abf564 (patch) | |
tree | b055aafa9da453b392cb07c1f28d43e44dcec168 /source3/winbindd/winbindd_dual_srv.c | |
parent | 33f10d06baf44e31d558bc5bd926c886915322cc (diff) | |
download | samba-3413e64149702136429d7b5acaa7a52c49abf564.tar.gz samba-3413e64149702136429d7b5acaa7a52c49abf564.tar.xz samba-3413e64149702136429d7b5acaa7a52c49abf564.zip |
s3:winbindd: fix _wbint_LookupSids() on error
We need to make sure that r->out.domains remains valid,
otherwise we're not able to marshall the response.
Note that wbint_LookupSids() has [out,ref] lsa_RefDomainList *domains,
while lsa_LookupSids() has [out,ref] lsa_RefDomainList **domains.
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10458
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/winbindd/winbindd_dual_srv.c')
-rw-r--r-- | source3/winbindd/winbindd_dual_srv.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c index 851c2c788fe..f064467bf23 100644 --- a/source3/winbindd/winbindd_dual_srv.c +++ b/source3/winbindd/winbindd_dual_srv.c @@ -74,6 +74,7 @@ NTSTATUS _wbint_LookupSid(struct pipes_struct *p, struct wbint_LookupSid *r) NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r) { struct winbindd_domain *domain = wb_child_domain(); + struct lsa_RefDomainList *domains = r->out.domains; NTSTATUS status; if (domain == NULL) { @@ -87,7 +88,12 @@ NTSTATUS _wbint_LookupSids(struct pipes_struct *p, struct wbint_LookupSids *r) * done at the wbint RPC layer. */ status = rpc_lookup_sids(p->mem_ctx, domain, r->in.sids, - &r->out.domains, &r->out.names); + &domains, &r->out.names); + + if (domains != NULL) { + r->out.domains = domains; + } + reset_cm_connection_on_error(domain, status); return status; } |