From: Michael Osipov Date: Sat, 27 Sep 2025 09:44:25 +0000 (+0200) Subject: Fix kvno argument order in t_authdata.py X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1459%2Fhead;p=thirdparty%2Fkrb5.git Fix kvno argument order in t_authdata.py In t_authdata.py, correct a kvno invocation so that it doesn't rely on GNU getopt behavior. In k5test.py, add POSIXLY_CORRECT=1 to the test environment to prevent future mistakes in this category. [ghudson@mit.edu: added test environment setting; edited commit message] --- diff --git a/src/tests/t_authdata.py b/src/tests/t_authdata.py index bde1c36844..72b57b0d71 100644 --- a/src/tests/t_authdata.py +++ b/src/tests/t_authdata.py @@ -331,7 +331,7 @@ rb.extract_keytab('user@B', rb.keytab) usercache = 'FILE:' + os.path.join(rb.testdir, 'usercache') rb.kinit(rb.user_princ, None, ['-k', '-f', '-c', usercache]) -rb.run([kvno, '-C', 'impersonator@A', '-c', usercache]) +rb.run([kvno, '-C', '-c', usercache, 'impersonator@A']) ra.kinit('impersonator@A', None, ['-f', '-k', '-t', ra.keytab]) ra.run(['./s4u2proxy', usercache, 'resource@A']) diff --git a/src/util/k5test.py b/src/util/k5test.py index bef645dd06..fa8a75d15a 100644 --- a/src/util/k5test.py +++ b/src/util/k5test.py @@ -671,6 +671,8 @@ def _build_env(): # Make sure we don't get confused by translated messages # or localized times. env['LC_ALL'] = 'C' + # Enforce proper argument order in tests with GNU getopt. + env['POSIXLY_CORRECT'] = '1' return env