diff options
Diffstat (limited to 'modules/pam_listfile/tst-pam_listfile-retval.c')
-rw-r--r-- | modules/pam_listfile/tst-pam_listfile-retval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/pam_listfile/tst-pam_listfile-retval.c b/modules/pam_listfile/tst-pam_listfile-retval.c index 02ed9446..78925409 100644 --- a/modules/pam_listfile/tst-pam_listfile-retval.c +++ b/modules/pam_listfile/tst-pam_listfile-retval.c @@ -5,6 +5,7 @@ */ #include "test_assert.h" +#include "pam_inline.h" #include <errno.h> #include <limits.h> @@ -27,9 +28,10 @@ main(void) { pam_handle_t *pamh = NULL; FILE *fp; + char *cwd; - char cwd[PATH_MAX]; - ASSERT_NE(NULL, getcwd(cwd, sizeof(cwd))); + cwd = xgetcwd(); + ASSERT_NE(NULL, cwd); struct passwd *pw; ASSERT_NE(NULL, (pw = getpwuid(geteuid()))); @@ -616,5 +618,7 @@ main(void) ASSERT_EQ(0, unlink(list_file)); ASSERT_EQ(0, unlink(service_file)); + free(cwd); + return 0; } |