[PATCH] Random patches
Jeremy Allison
jra at samba.org
Fri Feb 27 09:55:53 MST 2015
On Fri, Feb 27, 2015 at 03:11:32PM +0100, Volker Lendecke wrote:
> On Thu, Feb 26, 2015 at 04:21:18PM -0800, Jeremy Allison wrote:
> > OK, the patch that seems to be causing problems is
> > this one (attached). It's in the right area (dealing
> > with winbindd) although for the life of me I can't
> > see why it would cause this to fail on autobuild
> > but work locally.
> >
> > I've pushed all the others, and I'll keep looking
> > at this.
>
> Thanks for the patience. Just started the autobuild, but I
> bet the attached patch fixes it.
>
> Fingers crossed...
Ah, I'd already gotten as far as looking in init_lsa_ref_domain_list(),
but hadn't spotted the difference in handling the params yet :-).
Good catch !
> --
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de, mailto:kontakt at sernet.de
> From 6e68a53fbbe97d09b470dcf70a7ef9ce090386b0 Mon Sep 17 00:00:00 2001
> From: Volker Lendecke <vl at samba.org>
> Date: Fri, 27 Feb 2015 14:04:36 +0000
> Subject: [PATCH] lib: Fix talloc hierarchy in init_lsa_ref_domain_list
>
> The sid is copied, so the name should also be copied.
>
> Signed-off-by: Volker Lendecke <vl at samba.org>
> ---
> source3/lib/lsa.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/source3/lib/lsa.c b/source3/lib/lsa.c
> index 0046fda..6b9015a 100644
> --- a/source3/lib/lsa.c
> +++ b/source3/lib/lsa.c
> @@ -57,7 +57,11 @@ int init_lsa_ref_domain_list(TALLOC_CTX *mem_ctx,
>
> ZERO_STRUCT(ref->domains[num]);
>
> - ref->domains[num].name.string = dom_name;
> + ref->domains[num].name.string = talloc_strdup(mem_ctx, dom_name);
> + if (!ref->domains[num].name.string) {
> + return -1;
> + }
> +
> ref->domains[num].sid = dom_sid_dup(mem_ctx, dom_sid);
> if (!ref->domains[num].sid) {
> return -1;
> --
> 1.9.1
>
More information about the samba-technical
mailing list