diff options
Diffstat (limited to 'modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c')
-rw-r--r-- | modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c b/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c index 282c5cd0..0d7b0a4b 100644 --- a/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c +++ b/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c @@ -5,6 +5,7 @@ */ #include "test_assert.h" +#include "pam_inline.h" #include <fcntl.h> #include <limits.h> @@ -30,9 +31,10 @@ main(void) FILE *fp; struct passwd *pw; struct stat st; - char cwd[PATH_MAX]; + char *cwd; - ASSERT_NE(NULL, getcwd(cwd, sizeof(cwd))); + cwd = xgetcwd(); + ASSERT_NE(NULL, cwd); /* PAM_USER_UNKNOWN */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); @@ -106,5 +108,7 @@ main(void) ASSERT_EQ(0, unlink(service_file)); + free(cwd); + return 0; } |