check_unrelated_objectclasses
Matthias Dieter Wallnöfer
mdw at samba.org
Mon Jan 28 13:29:50 MST 2013
Hi,
Matthieu Patou schrieb:
> On 01/28/2013 01:36 AM, Matthias Dieter Wallnöfer wrote:
>> Hi Matthieu,
>>
>> when you are adding structural object classes to an object you have
>> to respect the schema hierarchy. That means all structural object
>> classes have to represent a linear parent-child relation (e.g. "user"
>> -> "computer").
>> If this constraint is violated you will end up in some kind of
>> branching (e.g. "user" and "contact") which does not work.
>> Subsequently exactly this error is generated.
> Ok So just to be 100% sure I'll get this error if I try to set
> objectClass to ["A", "B", "C"] and if B is not a subclass of A or if C
> is not a subclass of B right ?
If A, B and C are all structural classes (objectClassCategory=1) then yes.
> Do we have unit tests for this ?
We do have unit tests in "ldap.py" (please look at "test_objectclasses"().
Please have also a look at the implementation
"check_unrelated_objectclasses()" in the objectclass LDB module.
Matthias
>
> Matthieu.
>>
>> Matthias
>>
>> Matthieu Patou schrieb:
>>> Hello Matthias,
>>>
>>> While working with andrew on getting more DRS working I facing this
>>> error
>>>
>>> UNEXPECTED(error):
>>> samba4.drs.repl_schema.python(vampire_dc).repl_schema.DrsReplSchemaTestCase.test_classWithCustomAttribute(vampire_dc)
>>> REASON: _StringException: _StringException: Content-Type:
>>> text/x-traceback;charset=utf8,language=python
>>> traceback
>>> 1EE^M
>>> Traceback (most recent call last):
>>> File
>>> "/usr/local/src/samba/source4/torture/drs/python/repl_schema.py",
>>> line 177, in test_classWithCustomAttribute
>>> a_ldn: "test_classWithCustomAttribute"})
>>> File
>>> "/usr/local/src/samba/source4/torture/drs/python/repl_schema.py",
>>> line 87, in _schema_new_class
>>> ldb_ctx.add(rec)
>>> LdbError: (65, "LDAP error 65 LDAP_OBJECT_CLASS_VIOLATION -
>>> <00002014: objectclass: the objectclass
>>> 'DrsReplSchema13593868062clsA' seems to be unrelated to the entry!>#
>>> 0
>>>
>>> I'm incline to think that the testsuite is doing something wrong,
>>> but can you re-explain the purpose of the
>>> check_unrelated_objectclass ? just to be sure that I don't miss
>>> something.
>>>
>>> Thank you
>>
>
>
More information about the samba-technical
mailing list