diff options
Diffstat (limited to 'modules/pam_faillock/tst-pam_faillock-retval.c')
-rw-r--r-- | modules/pam_faillock/tst-pam_faillock-retval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/pam_faillock/tst-pam_faillock-retval.c b/modules/pam_faillock/tst-pam_faillock-retval.c index cbdc1684..3db2838a 100644 --- a/modules/pam_faillock/tst-pam_faillock-retval.c +++ b/modules/pam_faillock/tst-pam_faillock-retval.c @@ -3,6 +3,7 @@ */ #include "test_assert.h" +#include "pam_inline.h" #include <limits.h> #include <stdio.h> @@ -23,9 +24,10 @@ main(void) { pam_handle_t *pamh = NULL; FILE *fp; - char cwd[PATH_MAX]; + char *cwd; - ASSERT_NE(NULL, getcwd(cwd, sizeof(cwd))); + cwd = xgetcwd(); + ASSERT_NE(NULL, cwd); ASSERT_NE(NULL, fp = fopen(config_filename, "w")); ASSERT_LT(0, fprintf(fp, @@ -116,5 +118,7 @@ main(void) ASSERT_EQ(0,unlink(user_name)); ASSERT_EQ(0,unlink(config_filename)); + free(cwd); + return 0; } |