From 81a6e16539e5e4a27c55194ae095cc4a75d08ade Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 17 Jul 2013 09:51:32 +0200 Subject: tools: Use $TMPDIR instead of $TEMP TMPDIR is a more standard environment variable for locating the temp directory on Unix. In addition since this is only used in tests, remove the code from the generic p11_path_expand() func. In general remove the possibility for forks to put $HOME or $TEMP environment variables in configured paths. This was possible due to code in p11_path_expand() but not something we supported. https://bugzilla.redhat.com/show_bug.cgi?id=985017 --- trust/tests/test-module.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'trust/tests/test-module.c') diff --git a/trust/tests/test-module.c b/trust/tests/test-module.c index 80747da..5920076 100644 --- a/trust/tests/test-module.c +++ b/trust/tests/test-module.c @@ -138,9 +138,7 @@ setup_writable (void *unused) rv = C_GetFunctionList (&test.module); assert (rv == CKR_OK); - test.directory = p11_path_expand ("$TEMP/test-module.XXXXXX"); - if (!mkdtemp (test.directory)) - assert_not_reached (); + test.directory = p11_test_directory ("test-module"); memset (&args, 0, sizeof (args)); if (asprintf (&arguments, "paths='%s'", test.directory) < 0) -- cgit v1.1