1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

provision tests: Add a test for hashing overly long passwords

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14621

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2021-02-24 02:52:06 +13:00 committed by Andrew Bartlett
parent 0730b936d7
commit e656d8b1ad

View File

@ -58,6 +58,10 @@ class ProvisionUserPasswordTestCase(SambaToolCmdTest):
(result, out, err) = self.provision()
self.assertEqual(0, result)
def test_length(self):
(result, out, err) = self.provision(machinepass="FooBar123" + ("a"*1024))
self.assertNotEqual(0, result)
def tearDown(self):
super(ProvisionUserPasswordTestCase, self).tearDown()
shutil.rmtree(self.tempsambadir)