summaryrefslogtreecommitdiff
path: root/python/samba
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2024-12-12 10:46:16 +1300
committerAndreas Schneider <asn@cryptomilk.org>2024-12-20 07:04:31 +0000
commit552053b6445611ecef6ac4c11c55ebf92f03571d (patch)
tree070f9066166c3af092276c1b25d6bed0ff83462d /python/samba
parent4af4dd8135e8edbe2a16cfdfc7ded8c145c82e98 (diff)
downloadsamba-552053b6445611ecef6ac4c11c55ebf92f03571d.tar.gz
samba-552053b6445611ecef6ac4c11c55ebf92f03571d.tar.bz2
samba-552053b6445611ecef6ac4c11c55ebf92f03571d.zip
pytest: password_hash uses internal _glue.crypt
This will remove an external dependency. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15756 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'python/samba')
-rw-r--r--python/samba/tests/password_hash.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/tests/password_hash.py b/python/samba/tests/password_hash.py
index 1b7af7de7b8..39ef13fd7b2 100644
--- a/python/samba/tests/password_hash.py
+++ b/python/samba/tests/password_hash.py
@@ -30,11 +30,11 @@ from samba.dcerpc.samr import DOMAIN_PASSWORD_STORE_CLEARTEXT
from samba.dsdb import UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED
from samba.tests import delete_force
from samba.tests.password_test import PasswordCommon
+from samba._glue import crypt
import ldb
import samba
import binascii
from hashlib import md5
-import crypt
USER_NAME = "PasswordHashTestUser"
@@ -321,7 +321,7 @@ class PassWordHashTests(TestCase):
cmd = "$%s$rounds=%d$%s" % (alg, rounds, data[3])
# Calculate the expected hash value
- expected = crypt.crypt(USER_PASS, cmd)
+ expected = crypt(USER_PASS, cmd)
self.assertEqual(expected, up.hashes[i].value.decode('utf8'))
i += 1