diff options
Diffstat (limited to 'common/test.c')
-rw-r--r-- | common/test.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/test.c b/common/test.c index 3827ab0..9749a91 100644 --- a/common/test.c +++ b/common/test.c @@ -579,7 +579,8 @@ copy_file (const char *input, } char * -p11_test_copy_setgid (const char *input) +p11_test_copy_setgid (const char *input, + const char *tmpdir) { gid_t groups[128]; char *path; @@ -600,7 +601,9 @@ p11_test_copy_setgid (const char *input) return NULL; } - path = strdup (BUILDDIR "/test-setgid.XXXXXX"); + if (asprintf(&path, "%s/test-setgid.XXXXXX", tmpdir) < 0) + assert_not_reached(); + assert (path != NULL); fd = mkstemp (path); |