krb5 commit: Avoid long socket paths in KCM tests

Greg Hudson ghudson at mit.edu
Mon Aug 2 22:41:00 EDT 2021


https://github.com/krb5/krb5/commit/35fac31b7645e14d75200d31c631a8530c9b855c
commit 35fac31b7645e14d75200d31c631a8530c9b855c
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sun Aug 1 11:56:21 2021 -0400

    Avoid long socket paths in KCM tests
    
    The build directory path may be too long for a Unix domain socket, so
    use a path in a temporary directory instead.  Reported by Ryan
    Schmidt.
    
    ticket: 9019

 src/tests/t_ccache.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/tests/t_ccache.py b/src/tests/t_ccache.py
index 6ea9fb9..9e005ec 100755
--- a/src/tests/t_ccache.py
+++ b/src/tests/t_ccache.py
@@ -21,8 +21,10 @@
 # or implied warranty.
 
 from k5test import *
+import tempfile
 
-kcm_socket_path = os.path.join(os.getcwd(), 'testdir', 'kcm')
+socketdir = tempfile.TemporaryDirectory()
+kcm_socket_path = os.path.join(socketdir.name, 'kcm')
 conf = {'libdefaults': {'kcm_socket': kcm_socket_path,
                         'kcm_mach_service': '-'}}
 realm = K5Realm(krb5_conf=conf)


More information about the cvs-krb5 mailing list