Add trusted domain range objectclass when using idrange-mod

When modifing the idrange, one was able to add ipa NT trusted
AD domain sid without objectclass ipatrustedaddomainrange being
added. This patch fixes the issue.
This commit is contained in:
Tomas Babej
2013-02-20 10:50:36 +01:00
committed by Martin Kosek
parent 4ba2700de4
commit 68ffb4af2f

View File

@@ -533,6 +533,11 @@ class idrange_mod(LDAPUpdate):
# perform this check only if the attribute was changed
self.obj.validate_trusted_domain_sid(
entry_attrs['ipanttrusteddomainsid'])
# Add trusted AD domain range object class, if it wasn't there
if not 'ipatrustedaddomainrange' in old_attrs['objectclass']:
entry_attrs['objectclass'].append('ipatrustedaddomainrange')
else:
# secondary base rid must be set if and only if base rid is set
if in_updated_attrs('ipasecondarybaserid') !=\