[PATCHS] fix handling of AUX classes in objectclass.c
brendan powers
brendan0powers at gmail.com
Mon Dec 14 19:16:57 MST 2009
These patches fix the handling of AUX classes in objectclass.c. Before
this, adding an AUX class such as posixAccount to a user would fail
with LDB_ERR_OBJECT_CLASS_VIOLATION.
Here is a description of the patches
* 0001-return-NULL-in-strlower_talloc-if-src-is-NULL.patch, prevents
strlower_talloc from segfaulting if you pass it a NULL string.
* 0002-s4-dsdb-Add-a-check-to-prevent-acl_modify-from-debu.patch,
Check to see if there were any messages passed to acl_modify before
debugging the first one. I think I caused this by some malformed
ldiff. Unfortunately, I don't have the file that caused the problem.
* 0003-s4-dsdb-Move-get_last_structural-class-from-descrip.patch, Move
get_last_structural_class from descriptor.c to util.c so it can be
used by objectclass.c. Also, make get_last_structural_class ignore AUX
classes, as they are not structural classes.
* 0004-s4-dsdb-return-an-error-if-samAccountName-is-not-sp.patch,
makes sure samAccountName has been specified before adding a user.
This happened while I was trying to add a user with the posixAccount
objectclass. I forgot to specify the user objectClass, and samba
segfaulted. It now returns LDB_ERR_CONSTRAINT_VIOLATION.
* 0005-s4-dsdb-fix-handling-of-AUX-classes-in-objectclass_.patch, this
is the main patch in this set. It fixes the handling of AUX classes in
objectclass_sort. 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. Also this patch makes objectclass_do_add check
if the last structural class is a valid class to add, instead of the
last class returned by objectclass_sort.
* 0006-s4-dsdb-Add-a-test-for-adding-deleting-and-append.patch, add a
test to make sure you can add the posixAccount class to an object.
This was the original reason for this set of patches.
These patches now pass make test. So I thought it was time to send
them to the list. Hopefully I did things right this time:)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-return-NULL-in-strlower_talloc-if-src-is-NULL.patch
Type: text/x-diff
Size: 903 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091214/d19ea09e/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-s4-dsdb-Add-a-check-to-prevent-acl_modify-from-debu.patch
Type: text/x-diff
Size: 1059 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091214/d19ea09e/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-s4-dsdb-Move-get_last_structural-class-from-descrip.patch
Type: text/x-diff
Size: 3509 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091214/d19ea09e/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-s4-dsdb-return-an-error-if-samAccountName-is-not-sp.patch
Type: text/x-diff
Size: 1038 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091214/d19ea09e/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-s4-dsdb-fix-handling-of-AUX-classes-in-objectclass_.patch
Type: text/x-diff
Size: 15491 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091214/d19ea09e/attachment-0004.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-s4-dsdb-Add-a-test-for-adding-deleting-and-append.patch
Type: text/x-diff
Size: 2140 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091214/d19ea09e/attachment-0005.patch>
More information about the samba-technical
mailing list