From: Jo Sutton Date: Tue, 30 Apr 2024 02:36:07 +0000 (+1200) Subject: python:tests: Pass ServerPasswordSet2() parameters in correct order X-Git-Tag: tdb-1.4.11~673 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdaa29436976c4aec94c239ee9d65eb6d8f920f5;p=thirdparty%2Fsamba.git python:tests: Pass ServerPasswordSet2() parameters in correct order ‘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 Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/py_credentials.py b/python/samba/tests/py_credentials.py index bd9dfd4fde2..767fba28e95 100644 --- a/python/samba/tests/py_credentials.py +++ b/python/samba/tests/py_credentials.py @@ -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)