]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix kvno argument order in t_authdata.py master 1459/head
authorMichael Osipov <michael.osipov@innomotics.com>
Sat, 27 Sep 2025 09:44:25 +0000 (11:44 +0200)
committerGreg Hudson <ghudson@mit.edu>
Tue, 30 Sep 2025 21:17:18 +0000 (17:17 -0400)
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]

src/tests/t_authdata.py
src/util/k5test.py

index bde1c368442238c9587e348032dc0d8328bc3b26..72b57b0d71807fc0fcbcdc7dc8c98b7d8fd9b3b4 100644 (file)
@@ -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'])
index bef645dd063cade115f0fb4cc71b2455f42f1dfc..fa8a75d15af740a54785f1db321fb830de2c037a 100644 (file)
@@ -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