[PATCH] s4:dsdb/common: samdb_result_parameters: fix bug in ldb_val to lsa_BinaryString conversation
Stefan Gohmann
gohmann at univention.de
Mon May 26 22:37:32 MDT 2014
Hi Karmen,
Am 27.05.2014 03:24, schrieb Kamen Mazdrashki:
> Hi Stefan,
>
>
> On Mon, May 26, 2014 at 11:03 PM, Stefan Gohmann <gohmann at univention.de
> <mailto:gohmann at univention.de>> wrote:
>
> Hi Matthias,
>
> Am 26.05.2014 14 <tel:26.05.2014%2014>:09, schrieb Matthias Dieter
> Wallnöfer:
> > Hi Stefan,
> >
> > it seems that no other one responded. I think that this is rather a
> > problem with the "userParameters" attribute which we still do not
> parse
> > correctly I think.
>
> thanks. I've re-checked this issue.
>
> In my case the userParameters attribute is 105 bytes long. I think the
> problem is that the length is odd and so there is one byte missing.
>
> I was able to reproduce this issue while setting userParameters for a
> user to the following value:
>
> userParameters::
> Q3R4Q2ZnUHJlc2VudCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUAIaCAFDdHhDZmdQcmVzZW5045S15pSx5oiw44GiGAgBQ3R4Q2ZnRmxhZ3Mx44Cw44Gm44Cy44C5
>
> and run
> net user /domain username
> from a Windows client.
>
> Attached you'll find an updated patch which fixed the problem for me.
>
> IMHO, the correct fix should be:
> +s.array = talloc_array(mem_ctx, uint16_t, (val->length + 1) / 2);
> so we don't allocate an extra bytes in 'normal' scenario when length is
> even.
you are right. Please find a new patch attached.
Thanks,
Stefan
--
Stefan Gohmann
Head of Software Engineering
Univention GmbH
be open.
Mary-Somerville-Str.1
28359 Bremen
Tel. : +49 421 22232-0
Fax : +49 421 22232-99
gohmann at univention.de
http://www.univention.de
Geschäftsführer: Peter H. Ganten
HRB 20755 Amtsgericht Bremen
Steuer-Nr.: 71-597-02876
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-dsdb-common-samdb_result_parameters-fix-bug-in-ld.patch
Type: text/x-patch
Size: 2401 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140527/d222aaff/attachment.bin>
More information about the samba-technical
mailing list