diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-03-01 21:46:15 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-03-01 21:46:15 +0800 |
commit | aef952483b48edd612059c025f63d5b628df6f44 (patch) | |
tree | 3246efd78076664effbcf3b41c21b120743abc66 /modules/pam_pwhistory | |
parent | 1e674b2f6ee96f7ae21bb8dc437249e404323169 (diff) | |
download | pam-debian.tar.gz pam-debian.tar.bz2 pam-debian.zip |
HALF WORK: MAX_PATHdebian
Diffstat (limited to 'modules/pam_pwhistory')
-rw-r--r-- | modules/pam_pwhistory/tst-pam_pwhistory-retval.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/pam_pwhistory/tst-pam_pwhistory-retval.c b/modules/pam_pwhistory/tst-pam_pwhistory-retval.c index aa2c24e8..24546580 100644 --- a/modules/pam_pwhistory/tst-pam_pwhistory-retval.c +++ b/modules/pam_pwhistory/tst-pam_pwhistory-retval.c @@ -5,6 +5,7 @@ */ #include "test_assert.h" +#include "pam_inline.h" #include <limits.h> #include <stdio.h> @@ -23,9 +24,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); /* PAM_USER_UNKNOWN */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); @@ -56,5 +58,7 @@ main(void) /* cleanup */ ASSERT_EQ(0, unlink(service_file)); + free(cwd); + return 0; } |