aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c')
-rw-r--r--modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c b/modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c
index 1c8af396..73a1740f 100644
--- a/modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c
+++ b/modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c
@@ -5,6 +5,7 @@
*/
#include "test_assert.h"
+#include "pam_inline.h"
#include <errno.h>
#include <limits.h>
@@ -62,9 +63,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(0)));
@@ -193,5 +195,7 @@ main(void)
ASSERT_EQ(0, unlink(service_file));
+ free(cwd);
+
return 0;
}