If we get a string, we’ll still assume it’s a DN and create a security
descriptor using it.
This is useful in cases where we don’t have a DN (e.g., the account is
not created yet).
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
details['msDS-AllowedToDelegateTo'] = delegation_to_spn
if delegation_from_dn:
- security_descriptor = self.get_security_descriptor(
- delegation_from_dn)
+ if isinstance(delegation_from_dn, str):
+ delegation_from_dn = self.get_security_descriptor(
+ delegation_from_dn)
details['msDS-AllowedToActOnBehalfOfOtherIdentity'] = (
- security_descriptor)
+ delegation_from_dn)
if spn is None and account_type is not self.AccountType.USER:
spn = 'host/' + user_name