1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-01 19:52:19 +01:00

Merge branch 'pr-141'

This commit is contained in:
Klas Lindfors 2018-04-09 09:10:19 +02:00
commit 6fe39d60d1
No known key found for this signature in database
GPG Key ID: BCA00FD4B2168C0A

View File

@ -180,12 +180,10 @@ static void test_check_user_challenge_file(void) {
unlink(buf); unlink(buf);
/* create temporary directory */ /* create temporary directory */
tmpdir_path = tempnam(NULL, "pamtest"); char template[] = "/tmp/pamtest.XXXXXX";
tmpdir_path = mkdtemp(template);
assert(tmpdir_path != NULL); assert(tmpdir_path != NULL);
ret = mkdir(tmpdir_path, 0755);
assert(ret == 0);
/* set user data */ /* set user data */
user.pw_name = "tester"; user.pw_name = "tester";
user.pw_dir = tmpdir_path; user.pw_dir = tmpdir_path;
@ -242,7 +240,6 @@ static void test_check_user_challenge_file(void) {
/* remove temporary directory */ /* remove temporary directory */
ret = rmdir(tmpdir_path); ret = rmdir(tmpdir_path);
assert(ret == 0); assert(ret == 0);
free(tmpdir_path);
free(buf); free(buf);
/* check test results */ /* check test results */