diff options
| author | Rob van der Linde <rob@catalyst.net.nz> | 2023-11-28 15:13:21 +1300 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2023-11-30 01:05:32 +0000 |
| commit | b14ead30da3fa6a12412ce97724daebb3cc3ebfa (patch) | |
| tree | 6e746f123564ca3660e135529e5db39135893ed0 /python | |
| parent | 1a45e49b5f6286f8a5071536e5a780322b7e1e9c (diff) | |
| download | samba-b14ead30da3fa6a12412ce97724daebb3cc3ebfa.tar.gz samba-b14ead30da3fa6a12412ce97724daebb3cc3ebfa.tar.bz2 samba-b14ead30da3fa6a12412ce97724daebb3cc3ebfa.zip | |
python: move HRES_SEC_* constants to samba module
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/__init__.py | 3 | ||||
| -rwxr-xr-x | python/samba/tests/krb5/authn_policy_tests.py | 4 | ||||
| -rwxr-xr-x | python/samba/tests/krb5/protected_users_tests.py | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/python/samba/__init__.py b/python/samba/__init__.py index 3e6ea7d18e1..f11164a29ba 100644 --- a/python/samba/__init__.py +++ b/python/samba/__init__.py @@ -398,3 +398,6 @@ NTSTATUSError = _glue.NTSTATUSError HRESULTError = _glue.HRESULTError WERRORError = _glue.WERRORError DsExtendedError = _glue.DsExtendedError + +HRES_SEC_E_LOGON_DENIED = 0x8009030C +HRES_SEC_E_INVALID_TOKEN = 0x80090308 diff --git a/python/samba/tests/krb5/authn_policy_tests.py b/python/samba/tests/krb5/authn_policy_tests.py index 43a975fac8e..6ce2e41d1c7 100755 --- a/python/samba/tests/krb5/authn_policy_tests.py +++ b/python/samba/tests/krb5/authn_policy_tests.py @@ -38,6 +38,7 @@ from samba.netcmd.domain.models import AuthenticationPolicy, AuthenticationSilo import samba.tests import samba.tests.krb5.kcrypto as kcrypto +from samba import HRES_SEC_E_INVALID_TOKEN, HRES_SEC_E_LOGON_DENIED from samba.tests.krb5.kdc_base_test import GroupType from samba.tests.krb5.kdc_tgs_tests import KdcTgsBaseTests from samba.tests.auth_log_base import AuthLogTestBase, NoMessageException @@ -59,9 +60,6 @@ SidType = RawKerberosTest.SidType global_asn1_print = False global_hexdump = False -HRES_SEC_E_INVALID_TOKEN = 0x80090308 -HRES_SEC_E_LOGON_DENIED = 0x8009030C - AUTHN_VERSION = {'major': 1, 'minor': 3} AUTHZ_VERSION = {'major': 1, 'minor': 2} diff --git a/python/samba/tests/krb5/protected_users_tests.py b/python/samba/tests/krb5/protected_users_tests.py index b592b4a893f..b2955a874e1 100755 --- a/python/samba/tests/krb5/protected_users_tests.py +++ b/python/samba/tests/krb5/protected_users_tests.py @@ -26,7 +26,7 @@ from functools import partial import ldb -from samba import generate_random_password, ntstatus +from samba import generate_random_password, ntstatus, HRES_SEC_E_LOGON_DENIED from samba.dcerpc import netlogon, security import samba.tests.krb5.kcrypto as kcrypto @@ -51,8 +51,6 @@ import samba.tests.krb5.rfc4120_pyasn1 as krb5_asn1 global_asn1_print = False global_hexdump = False -HRES_SEC_E_LOGON_DENIED = 0x8009030C - class ProtectedUsersTests(KDCBaseTest): def setUp(self): |
