Unable to map attributeID
Andrew Bartlett
abartlet at samba.org
Sun Aug 23 06:32:47 MDT 2009
On Sat, 2009-08-22 at 15:42 +0400, Matthieu Patou wrote:
> Hello all,
>
> in my tries to create an script to upgrade provision I am a blocked when
> I try to create missing attributes in the schema.ldb:
>
> schema_fsmo_add: failed to map attributeID[1.2.840.113556.1.4.767-FP]:
> WERR_INVALID_PARAM
In the C code that generates that message, replace all instances of
printf("%s", foo->data) with printf("%*.s", foo->length, foo->data)
Then find all the instances where we do something like:
char *foo_str = foo->data
and replace with
char *foo_str talloc_strndup(ctx, foo->data, foo->length)
(or any other similar construction to ensure we respect the length of
the input).
The python bindings now take the LDB interface at their word, and only
supply the length-limited string, without a NULL terminator. As such,
we are not finding bugs in all the code that assumed that there is
always a NULL terminator at the end of a ->data in a struct ldb_val.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090823/467d698c/attachment.pgp>
More information about the samba-technical
mailing list