Unable to map attributeID
abartlet at samba.org
Sun Aug 23 21:03:38 MDT 2009
On Sun, 2009-08-23 at 22:32 +1000, Andrew Bartlett wrote:
> 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.1135188.8.131.527-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.
The bug here is that schema_fsmo.c call samdb_result_string(). This
does the evil cast - but fixing it would imply having it duplicate every
string ever returned from LDB.
This might be harder to fix than I hoped :-(
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the samba-technical