s4-dsdb: fix handling of AUX classes in objectclass_sort
commit08060068bf9ad7cc5f450e805b0caab30d407a56
authorBrendan Powers <brendan0powers@gmail.com>
Tue, 15 Dec 2009 01:47:18 +0000 (14 20:47 -0500)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 18 Dec 2009 03:27:44 +0000 (18 14:27 +1100)
treeccf0a6aaea111ea2144b369bbfedd86551f7961f
parent8b889256540e471c399f020871cf18fb4d89e694
s4-dsdb: fix handling of AUX classes in objectclass_sort

This is done by sorting the classes by subClass_order, which will
check if the last structural class is valid to add (in
objectclass_do_add instead checking the last class in the list).

They were being sorted by building a class tree, and adding the
classes to the list in that order. However, AUX classes usually don't
fit into that tree, so LDB_ERR_OBJECT_CLASS_VIOLATION was returned. I
have changed the behavior to sort the classes by subClass_order
instead.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/objectclass.c