Skip to content

Commit

Permalink
Merge branch 'pr-141'
Browse files Browse the repository at this point in the history
  • Loading branch information
klali committed Apr 9, 2018
2 parents d63c2f2 + a92a59c commit 6fe39d6
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/util_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,10 @@ static void test_check_user_challenge_file(void) {
unlink(buf);

/* create temporary directory */
tmpdir_path = tempnam(NULL, "pamtest");
char template[] = "/tmp/pamtest.XXXXXX";
tmpdir_path = mkdtemp(template);
assert(tmpdir_path != NULL);

ret = mkdir(tmpdir_path, 0755);
assert(ret == 0);

/* set user data */
user.pw_name = "tester";
user.pw_dir = tmpdir_path;
Expand Down Expand Up @@ -242,7 +240,6 @@ static void test_check_user_challenge_file(void) {
/* remove temporary directory */
ret = rmdir(tmpdir_path);
assert(ret == 0);
free(tmpdir_path);
free(buf);

/* check test results */
Expand Down

0 comments on commit 6fe39d6

Please sign in to comment.