krb5 commit: Fix kvno argument order in t_authdata.py
ghudson at mit.edu
ghudson at mit.edu
Tue Sep 30 17:40:10 EDT 2025
https://github.com/krb5/krb5/commit/14b762a41e61c677bd47bc6ced19ce8b05c000f0
commit 14b762a41e61c677bd47bc6ced19ce8b05c000f0
Author: Michael Osipov <michael.osipov at innomotics.com>
Date: Sat Sep 27 11:44:25 2025 +0200
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 at mit.edu: added test environment setting; edited commit
message]
src/tests/t_authdata.py | 2 +-
src/util/k5test.py | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tests/t_authdata.py b/src/tests/t_authdata.py
index bde1c3684..72b57b0d7 100644
--- a/src/tests/t_authdata.py
+++ b/src/tests/t_authdata.py
@@ -331,7 +331,7 @@ rb.extract_keytab('user at 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 at A', '-c', usercache])
+rb.run([kvno, '-C', '-c', usercache, 'impersonator at A'])
ra.kinit('impersonator at A', None, ['-f', '-k', '-t', ra.keytab])
ra.run(['./s4u2proxy', usercache, 'resource at A'])
diff --git a/src/util/k5test.py b/src/util/k5test.py
index bef645dd0..fa8a75d15 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
More information about the cvs-krb5
mailing list