aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_env/tst-pam_env-retval.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_env/tst-pam_env-retval.c')
-rw-r--r--modules/pam_env/tst-pam_env-retval.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/pam_env/tst-pam_env-retval.c b/modules/pam_env/tst-pam_env-retval.c
index c08f44c3..153d913c 100644
--- a/modules/pam_env/tst-pam_env-retval.c
+++ b/modules/pam_env/tst-pam_env-retval.c
@@ -6,6 +6,7 @@
*/
#include "test_assert.h"
+#include "pam_inline.h"
#include <errno.h>
#include <libgen.h>
@@ -153,9 +154,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);
setup();
@@ -285,6 +287,7 @@ main(void)
/* cleanup */
cleanup();
ASSERT_EQ(0, unlink(service_file));
+ free(cwd);
return 0;
}