diff options
author | Joseph Sutton <josephsutton@catalyst.net.nz> | 2023-04-27 16:20:25 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2023-05-05 02:54:31 +0000 |
commit | ab8a3e87bbe4d1f46aca3895dc3d91277eb28486 (patch) | |
tree | cfcecda5f16fecd5391d41e60cd96e4c70b6e3c4 /python | |
parent | 9d84f3384e6605e2c48a3ece0b0b50a751f73295 (diff) | |
download | samba-ab8a3e87bbe4d1f46aca3895dc3d91277eb28486.tar.gz |
tests/krb5: Allow specifying an encoded security descriptor
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>
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/tests/krb5/kdc_base_test.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python/samba/tests/krb5/kdc_base_test.py b/python/samba/tests/krb5/kdc_base_test.py index abb577fa968..bc7a510d117 100644 --- a/python/samba/tests/krb5/kdc_base_test.py +++ b/python/samba/tests/krb5/kdc_base_test.py @@ -1770,10 +1770,11 @@ class KDCBaseTest(RawKerberosTest): 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 |