[PATCH] DSDB schema attributes with no linkID are wrongly set as one way links

Samuel Cabrero scabrero at zentyal.com
Wed Dec 3 05:29:28 MST 2014


I have found that schema attributes entries with no linkID are set as 
one way links, which I think is wrong. 

When loading the schema, the function dsdb_attribute_from_ldb 
initialize the linkID field of the dsdb_attribute structure to 0 if 
the entry being loaded does not have linkID. Later, the function 
dsdb_setup_attribute_shortcuts sets one_way_link to true when the 
dsdb_attribute->linkID == 0, which cause all attributes with no linkID 
be considered one way links.

I have found here 
http://technet.microsoft.com/en-us/library/cc773309(v=ws.10).aspx that 
zero is not a valid value for linkID:

A linked pair is identified by the linkID values of two 
attributeSchema objects. The linkID of the forward link is an even, 
positive, nonzero value, and the linkID of the associated back link is 
the value of the forward linkID, incremented by one.

So I think dsdb_attribute->one_way_link has to be set to false when 
dsdb_attribute->linkID is 0.


Samuel Cabrero - Developer
scabrero at zentyal.com

Zentyal - Active Exchange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-dsdb-Attributes-with-linkID-0-are-not-one-way-links.patch
Type: text/x-patch
Size: 869 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141203/846403dc/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20141203/846403dc/attachment.pgp>

More information about the samba-technical mailing list