]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Avoid long socket paths in KCM tests 1205/head
authorGreg Hudson <ghudson@mit.edu>
Sun, 1 Aug 2021 15:56:21 +0000 (11:56 -0400)
committerGreg Hudson <ghudson@mit.edu>
Mon, 2 Aug 2021 23:51:13 +0000 (19:51 -0400)
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

index 6ea9fb969704fb7b7f8b9bb54bb1defa976ab85e..9e005ec56608c4934ad9aa5944101409d10a6b80 100755 (executable)
 # 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)