reforcing samba's schema

Matthieu Patou mat at
Tue Apr 3 02:36:04 MDT 2012

On 04/03/2012 01:23 AM, Matthieu Patou wrote:
> Hello Micheal,
> Following our talk about schema update, what I would do would be in 
> schema_data.c module (a ldb module mostly at the beginning of the 
> module list traversed by a ldb request) in function "schema_data_add" 
> after getting the oid from governId or attributeId, I would find the 
> dsdb_syntax for this kind of attribute (based on the oid) and check if 
> the about to be added attribute meet the requirement.
> I would also automatically add attributes "oMSyntax", "oMObjectClass" 
> if not specified.
> By checking the correctness before insterting and completing the ones 
> that aren't and that MS AD autocomplete we should gain a better 
> extendable schema.
After autocompleting (maybe in objectlass_attr) I think the best thing 
to do is to create a dsdb_attribute from the ldb_message that is about 
to be stored, and check that we can get syntax for this attribute with

attr->syntax = dsdb_syntax_for_attribute(attr);
Concerning the creation of the dsdb_attribute I think that 
dsdb_attribute_from_ldb can be splitted in at least two functions: 1 
which create a dsdb_attribute and one that do the setup of the schema 
and add the attribute in the attribute list.


Matthieu Patou
Samba Team

More information about the samba-technical mailing list