]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:tests: Pass ServerPasswordSet2() parameters in correct order
authorJo Sutton <josutton@catalyst.net.nz>
Tue, 30 Apr 2024 02:36:07 +0000 (14:36 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 16 May 2024 02:11:36 +0000 (02:11 +0000)
‘account_name’ and ‘server_name’ are passed in the wrong order. While
Samba ignores the account name parameter and doesn’t have a problem with
it missing its trailing dollar, Windows checks it and requires the
trailing dollar to be present.

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/py_credentials.py

index bd9dfd4fde2bcbd28e0c3df1250865424d83fbba..767fba28e95b1dd23521e2bddbea441555509554 100644 (file)
@@ -517,9 +517,9 @@ class PyCredentialsTests(TestCase):
         pwd.data = filler + [x if isinstance(x, int) else ord(x) for x in encoded]
         self.machine_creds.encrypt_netr_crypt_password(pwd)
         c.netr_ServerPasswordSet2(self.server,
-                                  self.machine_creds.get_workstation(),
+                                  f'{self.machine_name}$',
                                   SEC_CHAN_WKSTA,
-                                  self.machine_name,
+                                  self.machine_creds.get_workstation(),
                                   authenticator,
                                   pwd)