[PATCH] DSDB schema attributes with no linkID are wrongly set as one way links
Stefan (metze) Metzmacher
metze at samba.org
Wed Dec 3 05:52:17 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.
Sorry, but this patch is wrong.
'dsdb_attribute->linkID == 0' is the definition of a one way link.
We only need a separate variable 'dsdb_attribute->one_way_link' because
the Windows schema is broken and defines attributes with linkID > 0
and forgot to define an attribute for the backlink.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 181 bytes
Desc: OpenPGP digital signature
More information about the samba-technical