diff options
Diffstat (limited to 'modules/pam_localuser/tst-pam_localuser-retval.c')
-rw-r--r-- | modules/pam_localuser/tst-pam_localuser-retval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/pam_localuser/tst-pam_localuser-retval.c b/modules/pam_localuser/tst-pam_localuser-retval.c index f6c22f97..e50d08c8 100644 --- a/modules/pam_localuser/tst-pam_localuser-retval.c +++ b/modules/pam_localuser/tst-pam_localuser-retval.c @@ -5,6 +5,7 @@ */ #include "test_assert.h" +#include "pam_inline.h" #include <limits.h> #include <stdio.h> @@ -31,10 +32,11 @@ main(void) static struct pam_conv conv; pam_handle_t *pamh = NULL; FILE *fp; - char cwd[PATH_MAX]; char name[BUFSIZ]; + char *cwd; - ASSERT_NE(NULL, getcwd(cwd, sizeof(cwd))); + cwd = xgetcwd(); + ASSERT_NE(NULL, cwd); /* default passwd */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); @@ -140,5 +142,7 @@ main(void) ASSERT_EQ(0, unlink(service_file)); ASSERT_EQ(0, unlink(passwd_file)); + free(cwd); + return 0; } |