diff options
author | Dmitry V. Levin <ldv@strace.io> | 2024-08-22 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-08-22 08:00:00 +0000 |
commit | bbc52034e40f9d2cf0edee347cbe930c955271ad (patch) | |
tree | 38e43bbe2b827eaa93c12142d7b3f99e9e7d35f5 /modules | |
parent | 4d1d4f699551f395be065e60513eaf85f01b84e6 (diff) | |
download | pam-bbc52034e40f9d2cf0edee347cbe930c955271ad.tar.gz pam-bbc52034e40f9d2cf0edee347cbe930c955271ad.tar.bz2 pam-bbc52034e40f9d2cf0edee347cbe930c955271ad.zip |
build: parametrize libtool subdirectory
Unhardcode ".libs" subdirectory where libtool stores shared objects,
as other build systems doesn't necessarily use it.
* configure.ac (AC_DEFINE_UNQUOTED): Add LTDIR.
* modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c:
Replace ".libs/" with LTDIR.
* modules/pam_debug/tst-pam_debug-retval.c: Likewise.
* modules/pam_deny/tst-pam_deny-retval.c: Likewise.
* modules/pam_echo/tst-pam_echo-retval.c: Likewise.
* modules/pam_env/tst-pam_env-retval.c: Likewise.
* modules/pam_faildelay/tst-pam_faildelay-retval.c: Likewise.
* modules/pam_faillock/tst-pam_faillock-retval.c: Likewise.
* modules/pam_listfile/tst-pam_listfile-retval.c: Likewise.
* modules/pam_localuser/tst-pam_localuser-retval.c: Likewise.
* modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c: Likewise.
* modules/pam_nologin/tst-pam_nologin-retval.c: Likewise.
* modules/pam_permit/tst-pam_permit-retval.c: Likewise.
* modules/pam_pwhistory/tst-pam_pwhistory-retval.c: Likewise.
* modules/pam_rootok/tst-pam_rootok-retval.c: Likewise.
* modules/pam_sepermit/tst-pam_sepermit-retval.c: Likewise.
* modules/pam_succeed_if/tst-pam_succeed_if-retval.c: Likewise.
* modules/pam_time/tst-pam_time-retval.c: Likewise.
* modules/pam_warn/tst-pam_warn-retval.c: Likewise.
Diffstat (limited to 'modules')
18 files changed, 280 insertions, 280 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 a85a0043..1c8af396 100644 --- a/modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c +++ b/modules/pam_canonicalize_user/tst-pam_canonicalize_user-retval.c @@ -73,10 +73,10 @@ main(void) /* PAM_USER_UNKNOWN */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -98,10 +98,10 @@ main(void) /* PAM_IGNORE -> PAM_PERM_DENIED */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -123,14 +123,14 @@ main(void) /* PAM_IGNORE -> PAM_SUCCESS */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "auth required %s/../pam_permit/.libs/pam_permit.so\n" - "account required %s/.libs/%s.so\n" - "account required %s/../pam_permit/.libs/pam_permit.so\n" - "password required %s/.libs/%s.so\n" - "password required %s/../pam_permit/.libs/pam_permit.so\n" - "session required %s/.libs/%s.so\n" - "session required %s/../pam_permit/.libs/pam_permit.so\n", + "auth required %s/" LTDIR "%s.so\n" + "auth required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "account required %s/" LTDIR "%s.so\n" + "account required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "password required %s/" LTDIR "%s.so\n" + "password required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "session required %s/" LTDIR "%s.so\n" + "session required %s/../pam_permit/" LTDIR "pam_permit.so\n", cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, @@ -165,14 +165,14 @@ main(void) /* PAM_IGNORE -> PAM_SUCCESS, "ROOT" -> "root" */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "auth required %s/../pam_succeed_if/.libs/pam_succeed_if.so user = root\n" - "account required %s/.libs/%s.so\n" - "account required %s/../pam_succeed_if/.libs/pam_succeed_if.so user = root\n" - "password required %s/.libs/%s.so\n" - "password required %s/../pam_succeed_if/.libs/pam_succeed_if.so user = root\n" - "session required %s/.libs/%s.so\n" - "session required %s/../pam_succeed_if/.libs/pam_succeed_if.so user = root\n", + "auth required %s/" LTDIR "%s.so\n" + "auth required %s/../pam_succeed_if/" LTDIR "pam_succeed_if.so user = root\n" + "account required %s/" LTDIR "%s.so\n" + "account required %s/../pam_succeed_if/" LTDIR "pam_succeed_if.so user = root\n" + "password required %s/" LTDIR "%s.so\n" + "password required %s/../pam_succeed_if/" LTDIR "pam_succeed_if.so user = root\n" + "session required %s/" LTDIR "%s.so\n" + "session required %s/../pam_succeed_if/" LTDIR "pam_succeed_if.so user = root\n", cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, diff --git a/modules/pam_debug/tst-pam_debug-retval.c b/modules/pam_debug/tst-pam_debug-retval.c index 6d3edf8f..e83c89d5 100644 --- a/modules/pam_debug/tst-pam_debug-retval.c +++ b/modules/pam_debug/tst-pam_debug-retval.c @@ -37,10 +37,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so %s\n" - "account required %s/.libs/%s.so %s\n" - "password required %s/.libs/%s.so %s\n" - "session required %s/.libs/%s.so %s\n", + "auth required %s/" LTDIR "%s.so %s\n" + "account required %s/" LTDIR "%s.so %s\n" + "password required %s/" LTDIR "%s.so %s\n" + "session required %s/" LTDIR "%s.so %s\n", cwd, MODULE_NAME, args, cwd, MODULE_NAME, args, cwd, MODULE_NAME, args, diff --git a/modules/pam_deny/tst-pam_deny-retval.c b/modules/pam_deny/tst-pam_deny-retval.c index 356ca1f1..665fcef4 100644 --- a/modules/pam_deny/tst-pam_deny-retval.c +++ b/modules/pam_deny/tst-pam_deny-retval.c @@ -30,10 +30,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, diff --git a/modules/pam_echo/tst-pam_echo-retval.c b/modules/pam_echo/tst-pam_echo-retval.c index 2374b71a..8264cb0e 100644 --- a/modules/pam_echo/tst-pam_echo-retval.c +++ b/modules/pam_echo/tst-pam_echo-retval.c @@ -31,10 +31,10 @@ main(void) /* PAM_SUCCESS -> PAM_SUCCESS, PAM_IGNORE -> PAM_PERM_DENIED */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -69,14 +69,14 @@ main(void) /* PAM_IGNORE -> PAM_SUCCESS */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "auth required %s/../pam_permit/.libs/pam_permit.so\n" - "account required %s/.libs/%s.so\n" - "account required %s/../pam_permit/.libs/pam_permit.so\n" - "password required %s/.libs/%s.so\n" - "password required %s/../pam_permit/.libs/pam_permit.so\n" - "session required %s/.libs/%s.so\n" - "session required %s/../pam_permit/.libs/pam_permit.so\n", + "auth required %s/" LTDIR "%s.so\n" + "auth required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "account required %s/" LTDIR "%s.so\n" + "account required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "password required %s/" LTDIR "%s.so\n" + "password required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "session required %s/" LTDIR "%s.so\n" + "session required %s/../pam_permit/" LTDIR "pam_permit.so\n", cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, diff --git a/modules/pam_env/tst-pam_env-retval.c b/modules/pam_env/tst-pam_env-retval.c index 68f65455..17a045e2 100644 --- a/modules/pam_env/tst-pam_env-retval.c +++ b/modules/pam_env/tst-pam_env-retval.c @@ -167,10 +167,10 @@ main(void) */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so conffile=%s/%s\n" - "account required %s/.libs/%s.so conffile=%s/%s\n" - "password required %s/.libs/%s.so conffile=%s/%s\n" - "session required %s/.libs/%s.so conffile=%s/%s\n", + "auth required %s/" LTDIR "%s.so conffile=%s/%s\n" + "account required %s/" LTDIR "%s.so conffile=%s/%s\n" + "password required %s/" LTDIR "%s.so conffile=%s/%s\n" + "session required %s/" LTDIR "%s.so conffile=%s/%s\n", cwd, MODULE_NAME, cwd, missing_file, cwd, MODULE_NAME, cwd, missing_file, cwd, MODULE_NAME, cwd, missing_file, @@ -196,14 +196,14 @@ main(void) */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so conffile=%s/%s\n" - "auth required %s/../pam_permit/.libs/pam_permit.so\n" - "account required %s/.libs/%s.so conffile=%s/%s\n" - "account required %s/../pam_permit/.libs/pam_permit.so\n" - "password required %s/.libs/%s.so conffile=%s/%s\n" - "password required %s/../pam_permit/.libs/pam_permit.so\n" - "session required %s/.libs/%s.so conffile=%s/%s\n" - "session required %s/../pam_permit/.libs/pam_permit.so\n", + "auth required %s/" LTDIR "%s.so conffile=%s/%s\n" + "auth required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "account required %s/" LTDIR "%s.so conffile=%s/%s\n" + "account required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "password required %s/" LTDIR "%s.so conffile=%s/%s\n" + "password required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "session required %s/" LTDIR "%s.so conffile=%s/%s\n" + "session required %s/../pam_permit/" LTDIR "pam_permit.so\n", cwd, MODULE_NAME, cwd, missing_file, cwd, cwd, MODULE_NAME, cwd, missing_file, cwd, cwd, MODULE_NAME, cwd, missing_file, cwd, @@ -228,7 +228,7 @@ main(void) */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "session required %s/.libs/%s.so" + "session required %s/" LTDIR "%s.so" " conffile=%s/%s envfile=%s\n", cwd, MODULE_NAME, cwd, my_conf, "/dev/null")); @@ -243,7 +243,7 @@ main(void) */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "session required %s/.libs/%s.so" + "session required %s/" LTDIR "%s.so" " conffile=%s envfile=%s/%s\n", cwd, MODULE_NAME, "/dev/null", cwd, my_env)); @@ -257,7 +257,7 @@ main(void) /* envfile is a directory. So values will be read from {TEST_NAME_DIR}/usr/etc and {TEST_NAME_DIR}/etc */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "session required %s/.libs/%s.so" + "session required %s/" LTDIR "%s.so" " conffile=%s envfile=%s/%s/\n", cwd, MODULE_NAME, "/dev/null", @@ -270,7 +270,7 @@ main(void) /* conffile is a directory. So values will be read from {TEST_NAME_DIR}/usr/etc and {TEST_NAME_DIR}/etc */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "session required %s/.libs/%s.so" + "session required %s/" LTDIR "%s.so" " conffile=%s/%s/ envfile=%s\n", cwd, MODULE_NAME, cwd, TEST_NAME_DIR, diff --git a/modules/pam_faildelay/tst-pam_faildelay-retval.c b/modules/pam_faildelay/tst-pam_faildelay-retval.c index cbd8f2a8..72b16ef9 100644 --- a/modules/pam_faildelay/tst-pam_faildelay-retval.c +++ b/modules/pam_faildelay/tst-pam_faildelay-retval.c @@ -31,10 +31,10 @@ main(void) /* PAM_IGNORE -> PAM_PERM_DENIED */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so delay=1\n" - "account required %s/.libs/%s.so delay=1\n" - "password required %s/.libs/%s.so delay=1\n" - "session required %s/.libs/%s.so delay=1\n", + "auth required %s/" LTDIR "%s.so delay=1\n" + "account required %s/" LTDIR "%s.so delay=1\n" + "password required %s/" LTDIR "%s.so delay=1\n" + "session required %s/" LTDIR "%s.so delay=1\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -56,14 +56,14 @@ main(void) /* PAM_IGNORE -> PAM_SUCCESS */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so delay=1\n" - "auth required %s/../pam_permit/.libs/pam_permit.so\n" - "account required %s/.libs/%s.so delay=1\n" - "account required %s/../pam_permit/.libs/pam_permit.so\n" - "password required %s/.libs/%s.so delay=1\n" - "password required %s/../pam_permit/.libs/pam_permit.so\n" - "session required %s/.libs/%s.so delay=1\n" - "session required %s/../pam_permit/.libs/pam_permit.so\n", + "auth required %s/" LTDIR "%s.so delay=1\n" + "auth required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "account required %s/" LTDIR "%s.so delay=1\n" + "account required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "password required %s/" LTDIR "%s.so delay=1\n" + "password required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "session required %s/" LTDIR "%s.so delay=1\n" + "session required %s/../pam_permit/" LTDIR "pam_permit.so\n", cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, diff --git a/modules/pam_faillock/tst-pam_faillock-retval.c b/modules/pam_faillock/tst-pam_faillock-retval.c index 0590e951..cbdc1684 100644 --- a/modules/pam_faillock/tst-pam_faillock-retval.c +++ b/modules/pam_faillock/tst-pam_faillock-retval.c @@ -37,11 +37,11 @@ main(void) /* root has access */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/../pam_permit/.libs/pam_permit.so\n" - "auth required %s/.libs/%s.so authsucc even_deny_root dir=%s conf=%s\n" - "account required %s/.libs/%s.so dir=%s\n" - "password required %s/.libs/%s.so dir=%s\n" - "session required %s/.libs/%s.so dir=%s\n", + "auth required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "auth required %s/" LTDIR "%s.so authsucc even_deny_root dir=%s conf=%s\n" + "account required %s/" LTDIR "%s.so dir=%s\n" + "password required %s/" LTDIR "%s.so dir=%s\n" + "session required %s/" LTDIR "%s.so dir=%s\n", cwd, cwd, MODULE_NAME, cwd, config_filename, cwd, MODULE_NAME, cwd, @@ -66,10 +66,10 @@ main(void) /* root tries to login 2 times without success*/ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth requisite %s/.libs/%s.so dir=%s preauth even_deny_root conf=%s\n" - "auth [success=1 default=bad] %s/../pam_debug/.libs/pam_debug.so auth=perm_denied cred=success\n" - "auth [default=die] %s/.libs/%s.so dir=%s authfail even_deny_root conf=%s\n" - "auth sufficient %s/.libs/%s.so dir=%s authsucc even_deny_root conf=%s\n", + "auth requisite %s/" LTDIR "%s.so dir=%s preauth even_deny_root conf=%s\n" + "auth [success=1 default=bad] %s/../pam_debug/" LTDIR "pam_debug.so auth=perm_denied cred=success\n" + "auth [default=die] %s/" LTDIR "%s.so dir=%s authfail even_deny_root conf=%s\n" + "auth sufficient %s/" LTDIR "%s.so dir=%s authsucc even_deny_root conf=%s\n", cwd, MODULE_NAME, cwd, config_filename, cwd, cwd, MODULE_NAME, cwd, config_filename, @@ -89,10 +89,10 @@ main(void) /* root is locked for 5 sec*/ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth requisite %s/.libs/%s.so dir=%s preauth even_deny_root conf=%s\n" - "auth [success=1 default=bad] %s/../pam_debug/.libs/pam_debug.so auth=success cred=success\n" - "auth [default=die] %s/.libs/%s.so dir=%s authfail even_deny_root conf=%s\n" - "auth sufficient %s/.libs/%s.so dir=%s authsucc even_deny_root conf=%s\n", + "auth requisite %s/" LTDIR "%s.so dir=%s preauth even_deny_root conf=%s\n" + "auth [success=1 default=bad] %s/../pam_debug/" LTDIR "pam_debug.so auth=success cred=success\n" + "auth [default=die] %s/" LTDIR "%s.so dir=%s authfail even_deny_root conf=%s\n" + "auth sufficient %s/" LTDIR "%s.so dir=%s authsucc even_deny_root conf=%s\n", cwd, MODULE_NAME, cwd, config_filename, cwd, cwd, MODULE_NAME, cwd, config_filename, diff --git a/modules/pam_listfile/tst-pam_listfile-retval.c b/modules/pam_listfile/tst-pam_listfile-retval.c index 18ba2919..02ed9446 100644 --- a/modules/pam_listfile/tst-pam_listfile-retval.c +++ b/modules/pam_listfile/tst-pam_listfile-retval.c @@ -40,10 +40,10 @@ main(void) /* invalid onerr= specified */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so onerr\n" - "account required %s/.libs/%s.so onerr=\n" - "password required %s/.libs/%s.so onerr=0\n" - "session required %s/.libs/%s.so onerr=1\n", + "auth required %s/" LTDIR "%s.so onerr\n" + "account required %s/" LTDIR "%s.so onerr=\n" + "password required %s/" LTDIR "%s.so onerr=0\n" + "session required %s/" LTDIR "%s.so onerr=1\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -65,10 +65,10 @@ main(void) /* unknown option, implicit onerr=fail */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so one=1\n" - "account required %s/.libs/%s.so two=2\n" - "password required %s/.libs/%s.so three=3\n" - "session required %s/.libs/%s.so four=4\n", + "auth required %s/" LTDIR "%s.so one=1\n" + "account required %s/" LTDIR "%s.so two=2\n" + "password required %s/" LTDIR "%s.so three=3\n" + "session required %s/" LTDIR "%s.so four=4\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -90,10 +90,10 @@ main(void) /* unknown option, onerr=succeed after unknown option */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so one=1 onerr=succeed\n" - "account required %s/.libs/%s.so two=2 onerr=succeed\n" - "password required %s/.libs/%s.so three=3 onerr=succeed\n" - "session required %s/.libs/%s.so four=4 onerr=succeed\n", + "auth required %s/" LTDIR "%s.so one=1 onerr=succeed\n" + "account required %s/" LTDIR "%s.so two=2 onerr=succeed\n" + "password required %s/" LTDIR "%s.so three=3 onerr=succeed\n" + "session required %s/" LTDIR "%s.so four=4 onerr=succeed\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -115,10 +115,10 @@ main(void) /* unknown option, onerr=succeed before unknown option */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so onerr=succeed one=1\n" - "account required %s/.libs/%s.so onerr=succeed two=2\n" - "password required %s/.libs/%s.so onerr=succeed three=3\n" - "session required %s/.libs/%s.so onerr=succeed four=4\n", + "auth required %s/" LTDIR "%s.so onerr=succeed one=1\n" + "account required %s/" LTDIR "%s.so onerr=succeed two=2\n" + "password required %s/" LTDIR "%s.so onerr=succeed three=3\n" + "session required %s/" LTDIR "%s.so onerr=succeed four=4\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -140,10 +140,10 @@ main(void) /* no item= or invalid item= specified, implicit onerr=fail */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so item\n" - "password required %s/.libs/%s.so item=\n" - "session required %s/.libs/%s.so item=bad\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so item\n" + "password required %s/" LTDIR "%s.so item=\n" + "session required %s/" LTDIR "%s.so item=bad\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -165,10 +165,10 @@ main(void) /* no item= or invalid item= specified, explicit onerr=fail */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so onerr=fail\n" - "account required %s/.libs/%s.so onerr=fail item\n" - "password required %s/.libs/%s.so onerr=fail item=\n" - "session required %s/.libs/%s.so onerr=fail item=bad\n", + "auth required %s/" LTDIR "%s.so onerr=fail\n" + "account required %s/" LTDIR "%s.so onerr=fail item\n" + "password required %s/" LTDIR "%s.so onerr=fail item=\n" + "session required %s/" LTDIR "%s.so onerr=fail item=bad\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -190,10 +190,10 @@ main(void) /* no item= or invalid item= specified, onerr=succeed */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so onerr=succeed\n" - "account required %s/.libs/%s.so onerr=succeed item\n" - "password required %s/.libs/%s.so onerr=succeed item=\n" - "session required %s/.libs/%s.so onerr=succeed item=bad\n", + "auth required %s/" LTDIR "%s.so onerr=succeed\n" + "account required %s/" LTDIR "%s.so onerr=succeed item\n" + "password required %s/" LTDIR "%s.so onerr=succeed item=\n" + "session required %s/" LTDIR "%s.so onerr=succeed item=bad\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -215,10 +215,10 @@ main(void) /* no file= specified, implicit onerr=fail */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=user\n" - "account required %s/.libs/%s.so item=group\n" - "password required %s/.libs/%s.so item=ruser\n" - "session required %s/.libs/%s.so item=rhost\n", + "auth required %s/" LTDIR "%s.so item=user\n" + "account required %s/" LTDIR "%s.so item=group\n" + "password required %s/" LTDIR "%s.so item=ruser\n" + "session required %s/" LTDIR "%s.so item=rhost\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -240,10 +240,10 @@ main(void) /* no file= specified, onerr=succeed */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so onerr=succeed item=user\n" - "account required %s/.libs/%s.so onerr=succeed item=group\n" - "password required %s/.libs/%s.so onerr=succeed item=ruser\n" - "session required %s/.libs/%s.so onerr=succeed item=rhost\n", + "auth required %s/" LTDIR "%s.so onerr=succeed item=user\n" + "account required %s/" LTDIR "%s.so onerr=succeed item=group\n" + "password required %s/" LTDIR "%s.so onerr=succeed item=ruser\n" + "session required %s/" LTDIR "%s.so onerr=succeed item=rhost\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -265,10 +265,10 @@ main(void) /* no sense= or invalid sense= specified, implicit onerr=fail */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=user file=.\n" - "account required %s/.libs/%s.so item=group file=. sense\n" - "password required %s/.libs/%s.so item=shell file=. sense=\n" - "session required %s/.libs/%s.so item=tty file=. sense=bad\n", + "auth required %s/" LTDIR "%s.so item=user file=.\n" + "account required %s/" LTDIR "%s.so item=group file=. sense\n" + "password required %s/" LTDIR "%s.so item=shell file=. sense=\n" + "session required %s/" LTDIR "%s.so item=tty file=. sense=bad\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -290,10 +290,10 @@ main(void) /* no sense= or invalid sense= specified, onerr=succeed */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so onerr=succeed item=user file=.\n" - "account required %s/.libs/%s.so onerr=succeed item=group file=. sense\n" - "password required %s/.libs/%s.so onerr=succeed item=shell file=. sense=\n" - "session required %s/.libs/%s.so onerr=succeed item=tty file=. sense=bad\n", + "auth required %s/" LTDIR "%s.so onerr=succeed item=user file=.\n" + "account required %s/" LTDIR "%s.so onerr=succeed item=group file=. sense\n" + "password required %s/" LTDIR "%s.so onerr=succeed item=shell file=. sense=\n" + "session required %s/" LTDIR "%s.so onerr=succeed item=tty file=. sense=bad\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -315,10 +315,10 @@ main(void) /* invalid apply= specified, implicit onerr=fail */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=ruser file=. sense=allow apply=\n" - "account required %s/.libs/%s.so item=rhost file=. sense=allow apply=\n" - "password required %s/.libs/%s.so item=tty file=. sense=allow apply=@\n" - "session required %s/.libs/%s.so item=tty file=. sense=allow apply=\n", + "auth required %s/" LTDIR "%s.so item=ruser file=. sense=allow apply=\n" + "account required %s/" LTDIR "%s.so item=rhost file=. sense=allow apply=\n" + "password required %s/" LTDIR "%s.so item=tty file=. sense=allow apply=@\n" + "session required %s/" LTDIR "%s.so item=tty file=. sense=allow apply=\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -340,10 +340,10 @@ main(void) /* invalid apply= specified, onerr=succeed */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so onerr=succeed item=ruser file=. sense=allow apply=\n" - "account required %s/.libs/%s.so onerr=succeed item=rhost file=. sense=allow apply=\n" - "password required %s/.libs/%s.so onerr=succeed item=tty file=. sense=allow apply=@\n" - "session required %s/.libs/%s.so onerr=succeed item=tty file=. sense=allow apply=\n", + "auth required %s/" LTDIR "%s.so onerr=succeed item=ruser file=. sense=allow apply=\n" + "account required %s/" LTDIR "%s.so onerr=succeed item=rhost file=. sense=allow apply=\n" + "password required %s/" LTDIR "%s.so onerr=succeed item=tty file=. sense=allow apply=@\n" + "session required %s/" LTDIR "%s.so onerr=succeed item=tty file=. sense=allow apply=\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -365,10 +365,10 @@ main(void) /* PAM_IGNORE -> PAM_PERM_DENIED */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=rhost file=. sense=allow apply=:\n" - "account required %s/.libs/%s.so item=tty file=. sense=allow apply=@:\n" - "password required %s/.libs/%s.so item=rhost file=. sense=allow apply=:\n" - "session required %s/.libs/%s.so item=tty file=. sense=allow apply=@:\n", + "auth required %s/" LTDIR "%s.so item=rhost file=. sense=allow apply=:\n" + "account required %s/" LTDIR "%s.so item=tty file=. sense=allow apply=@:\n" + "password required %s/" LTDIR "%s.so item=rhost file=. sense=allow apply=:\n" + "session required %s/" LTDIR "%s.so item=tty file=. sense=allow apply=@:\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -390,10 +390,10 @@ main(void) /* item not set, sense=allow */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=rhost file=. sense=allow apply=%s\n" - "account required %s/.libs/%s.so item=tty file=. sense=allow apply=%s\n" - "password required %s/.libs/%s.so item=rhost file=. sense=allow apply=@%s\n" - "session required %s/.libs/%s.so item=tty file=. sense=allow apply=@%s\n", + "auth required %s/" LTDIR "%s.so item=rhost file=. sense=allow apply=%s\n" + "account required %s/" LTDIR "%s.so item=tty file=. sense=allow apply=%s\n" + "password required %s/" LTDIR "%s.so item=rhost file=. sense=allow apply=@%s\n" + "session required %s/" LTDIR "%s.so item=tty file=. sense=allow apply=@%s\n", cwd, MODULE_NAME, pw->pw_name, cwd, MODULE_NAME, pw->pw_name, cwd, MODULE_NAME, gr->gr_name, @@ -415,10 +415,10 @@ main(void) /* item not set, sense=deny */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=ruser file=. sense=deny\n" - "account required %s/.libs/%s.so item=rhost file=. sense=deny\n" - "password required %s/.libs/%s.so item=tty file=. sense=deny\n" - "session required %s/.libs/%s.so item=ruser file=. sense=deny\n", + "auth required %s/" LTDIR "%s.so item=ruser file=. sense=deny\n" + "account required %s/" LTDIR "%s.so item=rhost file=. sense=deny\n" + "password required %s/" LTDIR "%s.so item=tty file=. sense=deny\n" + "session required %s/" LTDIR "%s.so item=ruser file=. sense=deny\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -440,10 +440,10 @@ main(void) /* file does not exist, not a regular file, or world writable */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=user file= sense=allow\n" - "account required %s/.libs/%s.so item=user file=. sense=allow onerr=succeed\n" - "password required %s/.libs/%s.so item=user file=/ sense=allow onerr=succeed\n" - "session required %s/.libs/%s.so item=user file=/dev/null sense=allow onerr=succeed\n", + "auth required %s/" LTDIR "%s.so item=user file= sense=allow\n" + "account required %s/" LTDIR "%s.so item=user file=. sense=allow onerr=succeed\n" + "password required %s/" LTDIR "%s.so item=user file=/ sense=allow onerr=succeed\n" + "session required %s/" LTDIR "%s.so item=user file=/dev/null sense=allow onerr=succeed\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -465,10 +465,10 @@ main(void) /* item is listed, sense=allow */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=user file=%s sense=allow\n" - "account required %s/.libs/%s.so item=user file=%s sense=allow\n" - "password required %s/.libs/%s.so item=user file=%s sense=allow\n" - "session required %s/.libs/%s.so item=user file=%s sense=allow\n", + "auth required %s/" LTDIR "%s.so item=user file=%s sense=allow\n" + "account required %s/" LTDIR "%s.so item=user file=%s sense=allow\n" + "password required %s/" LTDIR "%s.so item=user file=%s sense=allow\n" + "session required %s/" LTDIR "%s.so item=user file=%s sense=allow\n", cwd, MODULE_NAME, list_file, cwd, MODULE_NAME, list_file, cwd, MODULE_NAME, list_file, @@ -494,10 +494,10 @@ main(void) /* item is listed, sense=deny */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=user file=%s sense=deny\n" - "account required %s/.libs/%s.so item=user file=%s sense=deny\n" - "password required %s/.libs/%s.so item=user file=%s sense=deny\n" - "session required %s/.libs/%s.so item=user file=%s sense=deny\n", + "auth required %s/" LTDIR "%s.so item=user file=%s sense=deny\n" + "account required %s/" LTDIR "%s.so item=user file=%s sense=deny\n" + "password required %s/" LTDIR "%s.so item=user file=%s sense=deny\n" + "session required %s/" LTDIR "%s.so item=user file=%s sense=deny\n", cwd, MODULE_NAME, list_file, cwd, MODULE_NAME, list_file, cwd, MODULE_NAME, list_file, @@ -523,10 +523,10 @@ main(void) /* item is not listed, sense=allow */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=user file=%s sense=allow\n" - "account required %s/.libs/%s.so item=user file=%s sense=allow\n" - "password required %s/.libs/%s.so item=user file=%s sense=allow\n" - "session required %s/.libs/%s.so item=user file=%s sense=allow\n", + "auth required %s/" LTDIR "%s.so item=user file=%s sense=allow\n" + "account required %s/" LTDIR "%s.so item=user file=%s sense=allow\n" + "password required %s/" LTDIR "%s.so item=user file=%s sense=allow\n" + "session required %s/" LTDIR "%s.so item=user file=%s sense=allow\n", cwd, MODULE_NAME, list_file, cwd, MODULE_NAME, list_file, cwd, MODULE_NAME, list_file, @@ -552,10 +552,10 @@ main(void) /* item is not listed, sense=deny */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so item=user file=%s sense=deny\n" - "account required %s/.libs/%s.so item=user file=%s sense=deny\n" - "password required %s/.libs/%s.so item=user file=%s sense=deny\n" - "session required %s/.libs/%s.so item=user file=%s sense=deny\n", + "auth required %s/" LTDIR "%s.so item=user file=%s sense=deny\n" + "account required %s/" LTDIR "%s.so item=user file=%s sense=deny\n" + "password required %s/" LTDIR "%s.so item=user file=%s sense=deny\n" + "session required %s/" LTDIR "%s.so item=user file=%s sense=deny\n", cwd, MODULE_NAME, list_file, cwd, MODULE_NAME, list_file, cwd, MODULE_NAME, list_file, @@ -583,17 +583,17 @@ main(void) ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" "# support line continuations, ignore escaped newlines in comments \\\n" "auth required \\\n" - " %s/.libs/%s.so \\ \n" + " %s/" LTDIR "%s.so \\ \n" " item=user \\\t\t\n" " file=%s \\ \t \t\n" " sense=deny\n" "\t \t # allow unneeded whitespace, ignore escaped newlines in comments \\ \n" - " account\t required %s/.libs/%s.so item=user file=%s sense=deny%c\\\n" + " account\t required %s/" LTDIR "%s.so item=user file=%s sense=deny%c\\\n" "line after NUL byte continues up to here\n" "# trim trailing comments, ignore escaped newlines in comments \\\t\n" - "password required %s/.libs/%s.so item=user file=%s sense=deny # foo=bar\n" + "password required %s/" LTDIR "%s.so item=user file=%s sense=deny # foo=bar\n" "# support %*s long lines\n" - "session required %*s/.libs/%s.so item=user file=%s sense=deny", + "session required %*s/" LTDIR "%s.so item=user file=%s sense=deny", cwd, MODULE_NAME, list_file, cwd, MODULE_NAME, list_file, '\0', cwd, MODULE_NAME, list_file, diff --git a/modules/pam_localuser/tst-pam_localuser-retval.c b/modules/pam_localuser/tst-pam_localuser-retval.c index 3d2c8a42..f6c22f97 100644 --- a/modules/pam_localuser/tst-pam_localuser-retval.c +++ b/modules/pam_localuser/tst-pam_localuser-retval.c @@ -39,7 +39,7 @@ main(void) /* default passwd */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME)); ASSERT_EQ(0, fclose(fp)); @@ -69,7 +69,7 @@ main(void) /* missing passwd file */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so file=%s\n", + "auth required %s/" LTDIR "%s.so file=%s\n", cwd, MODULE_NAME, missing_file)); ASSERT_EQ(0, fclose(fp)); @@ -83,7 +83,7 @@ main(void) /* custom passwd file */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so file=%s\n", + "auth required %s/" LTDIR "%s.so file=%s\n", cwd, MODULE_NAME, passwd_file)); ASSERT_EQ(0, fclose(fp)); diff --git a/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c b/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c index 451d2e56..282c5cd0 100644 --- a/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c +++ b/modules/pam_mkhomedir/tst-pam_mkhomedir-retval.c @@ -37,10 +37,10 @@ main(void) /* PAM_USER_UNKNOWN */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -76,10 +76,10 @@ main(void) /* PAM_SUCCESS */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so debug\n" - "account required %s/.libs/%s.so debug\n" - "password required %s/.libs/%s.so debug\n" - "session required %s/.libs/%s.so debug\n", + "auth required %s/" LTDIR "%s.so debug\n" + "account required %s/" LTDIR "%s.so debug\n" + "password required %s/" LTDIR "%s.so debug\n" + "session required %s/" LTDIR "%s.so debug\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, diff --git a/modules/pam_nologin/tst-pam_nologin-retval.c b/modules/pam_nologin/tst-pam_nologin-retval.c index 0046eec3..4d44a380 100644 --- a/modules/pam_nologin/tst-pam_nologin-retval.c +++ b/modules/pam_nologin/tst-pam_nologin-retval.c @@ -35,10 +35,10 @@ main(void) /* PAM_IGNORE -> PAM_PERM_DENIED */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so file=%s\n" - "account required %s/.libs/%s.so file=%s\n" - "password required %s/.libs/%s.so file=%s\n" - "session required %s/.libs/%s.so file=%s\n", + "auth required %s/" LTDIR "%s.so file=%s\n" + "account required %s/" LTDIR "%s.so file=%s\n" + "password required %s/" LTDIR "%s.so file=%s\n" + "session required %s/" LTDIR "%s.so file=%s\n", cwd, MODULE_NAME, missing_file, cwd, MODULE_NAME, missing_file, cwd, MODULE_NAME, missing_file, @@ -60,14 +60,14 @@ main(void) /* PAM_IGNORE -> PAM_SUCCESS */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so file=%s\n" - "auth required %s/../pam_permit/.libs/pam_permit.so\n" - "account required %s/.libs/%s.so file=%s\n" - "account required %s/../pam_permit/.libs/pam_permit.so\n" - "password required %s/.libs/%s.so file=%s\n" - "password required %s/../pam_permit/.libs/pam_permit.so\n" - "session required %s/.libs/%s.so file=%s\n" - "session required %s/../pam_permit/.libs/pam_permit.so\n", + "auth required %s/" LTDIR "%s.so file=%s\n" + "auth required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "account required %s/" LTDIR "%s.so file=%s\n" + "account required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "password required %s/" LTDIR "%s.so file=%s\n" + "password required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "session required %s/" LTDIR "%s.so file=%s\n" + "session required %s/../pam_permit/" LTDIR "pam_permit.so\n", cwd, MODULE_NAME, missing_file, cwd, cwd, MODULE_NAME, missing_file, cwd, cwd, MODULE_NAME, missing_file, cwd, @@ -89,10 +89,10 @@ main(void) /* successok -> PAM_SUCCESS */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so successok file=%s\n" - "account required %s/.libs/%s.so successok file=%s\n" - "password required %s/.libs/%s.so successok file=%s\n" - "session required %s/.libs/%s.so successok file=%s\n", + "auth required %s/" LTDIR "%s.so successok file=%s\n" + "account required %s/" LTDIR "%s.so successok file=%s\n" + "password required %s/" LTDIR "%s.so successok file=%s\n" + "session required %s/" LTDIR "%s.so successok file=%s\n", cwd, MODULE_NAME, missing_file, cwd, MODULE_NAME, missing_file, cwd, MODULE_NAME, missing_file, @@ -114,10 +114,10 @@ main(void) /* PAM_USER_UNKNOWN */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so file=%s\n" - "account required %s/.libs/%s.so file=%s\n" - "password required %s/.libs/%s.so file=%s\n" - "session required %s/.libs/%s.so file=%s\n", + "auth required %s/" LTDIR "%s.so file=%s\n" + "account required %s/" LTDIR "%s.so file=%s\n" + "password required %s/" LTDIR "%s.so file=%s\n" + "session required %s/" LTDIR "%s.so file=%s\n", cwd, MODULE_NAME, empty_file, cwd, MODULE_NAME, empty_file, cwd, MODULE_NAME, empty_file, @@ -141,10 +141,10 @@ main(void) /* successok -> PAM_SUCCESS */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so successok file=%s\n" - "account required %s/.libs/%s.so successok file=%s\n" - "password required %s/.libs/%s.so successok file=%s\n" - "session required %s/.libs/%s.so successok file=%s\n", + "auth required %s/" LTDIR "%s.so successok file=%s\n" + "account required %s/" LTDIR "%s.so successok file=%s\n" + "password required %s/" LTDIR "%s.so successok file=%s\n" + "session required %s/" LTDIR "%s.so successok file=%s\n", cwd, MODULE_NAME, empty_file, cwd, MODULE_NAME, empty_file, cwd, MODULE_NAME, empty_file, @@ -167,10 +167,10 @@ main(void) /* PAM_SYSTEM_ERR */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so file=%s\n" - "account required %s/.libs/%s.so file=%s\n" - "password required %s/.libs/%s.so file=%s\n" - "session required %s/.libs/%s.so file=%s\n", + "auth required %s/" LTDIR "%s.so file=%s\n" + "account required %s/" LTDIR "%s.so file=%s\n" + "password required %s/" LTDIR "%s.so file=%s\n" + "session required %s/" LTDIR "%s.so file=%s\n", cwd, MODULE_NAME, ".", cwd, MODULE_NAME, ".", cwd, MODULE_NAME, ".", @@ -196,10 +196,10 @@ main(void) /* PAM_AUTH_ERR */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so file=%s\n" - "account required %s/.libs/%s.so file=%s\n" - "password required %s/.libs/%s.so file=%s\n" - "session required %s/.libs/%s.so file=%s\n", + "auth required %s/" LTDIR "%s.so file=%s\n" + "account required %s/" LTDIR "%s.so file=%s\n" + "password required %s/" LTDIR "%s.so file=%s\n" + "session required %s/" LTDIR "%s.so file=%s\n", cwd, MODULE_NAME, empty_file, cwd, MODULE_NAME, empty_file, cwd, MODULE_NAME, empty_file, diff --git a/modules/pam_permit/tst-pam_permit-retval.c b/modules/pam_permit/tst-pam_permit-retval.c index e8cf9692..aacdedba 100644 --- a/modules/pam_permit/tst-pam_permit-retval.c +++ b/modules/pam_permit/tst-pam_permit-retval.c @@ -30,10 +30,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -57,12 +57,12 @@ main(void) ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" "# ignore escaped newlines in comments \\\n" "auth required \\\n" - " %s/.libs/%s.so\n" + " %s/" LTDIR "%s.so\n" "# allow unneeded whitespaces\n" - " account required %s/.libs/%s.so%c\\\n" + " account required %s/" LTDIR "%s.so%c\\\n" "line after NUL byte continues up to here\n" - "password required %s/.libs/%s.so # eol comment\n" - "session required %s/.libs/%s.so", + "password required %s/" LTDIR "%s.so # eol comment\n" + "session required %s/" LTDIR "%s.so", cwd, MODULE_NAME, cwd, MODULE_NAME, '\0', cwd, MODULE_NAME, diff --git a/modules/pam_pwhistory/tst-pam_pwhistory-retval.c b/modules/pam_pwhistory/tst-pam_pwhistory-retval.c index 9c9a62b4..aa2c24e8 100644 --- a/modules/pam_pwhistory/tst-pam_pwhistory-retval.c +++ b/modules/pam_pwhistory/tst-pam_pwhistory-retval.c @@ -31,10 +31,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, diff --git a/modules/pam_rootok/tst-pam_rootok-retval.c b/modules/pam_rootok/tst-pam_rootok-retval.c index b1797013..990ee126 100644 --- a/modules/pam_rootok/tst-pam_rootok-retval.c +++ b/modules/pam_rootok/tst-pam_rootok-retval.c @@ -30,10 +30,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, diff --git a/modules/pam_sepermit/tst-pam_sepermit-retval.c b/modules/pam_sepermit/tst-pam_sepermit-retval.c index 321bd6d1..4132f286 100644 --- a/modules/pam_sepermit/tst-pam_sepermit-retval.c +++ b/modules/pam_sepermit/tst-pam_sepermit-retval.c @@ -33,10 +33,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -66,10 +66,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so conf=%s\n" - "account required %s/.libs/%s.so conf=%s\n" - "password required %s/.libs/%s.so conf=%s\n" - "session required %s/.libs/%s.so conf=%s\n", + "auth required %s/" LTDIR "%s.so conf=%s\n" + "account required %s/" LTDIR "%s.so conf=%s\n" + "password required %s/" LTDIR "%s.so conf=%s\n" + "session required %s/" LTDIR "%s.so conf=%s\n", cwd, MODULE_NAME, config_file, cwd, MODULE_NAME, config_file, cwd, MODULE_NAME, config_file, @@ -95,14 +95,14 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so conf=%s\n" - "auth required %s/../pam_permit/.libs/pam_permit.so\n" - "account required %s/.libs/%s.so conf=%s\n" - "account required %s/../pam_permit/.libs/pam_permit.so\n" - "password required %s/.libs/%s.so conf=%s\n" - "password required %s/../pam_permit/.libs/pam_permit.so\n" - "session required %s/.libs/%s.so conf=%s\n" - "session required %s/../pam_permit/.libs/pam_permit.so\n", + "auth required %s/" LTDIR "%s.so conf=%s\n" + "auth required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "account required %s/" LTDIR "%s.so conf=%s\n" + "account required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "password required %s/" LTDIR "%s.so conf=%s\n" + "password required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "session required %s/" LTDIR "%s.so conf=%s\n" + "session required %s/../pam_permit/" LTDIR "pam_permit.so\n", cwd, MODULE_NAME, config_file, cwd, cwd, MODULE_NAME, config_file, cwd, cwd, MODULE_NAME, config_file, cwd, @@ -128,10 +128,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so conf=%s\n" - "account required %s/.libs/%s.so conf=%s\n" - "password required %s/.libs/%s.so conf=%s\n" - "session required %s/.libs/%s.so conf=%s\n", + "auth required %s/" LTDIR "%s.so conf=%s\n" + "account required %s/" LTDIR "%s.so conf=%s\n" + "password required %s/" LTDIR "%s.so conf=%s\n" + "session required %s/" LTDIR "%s.so conf=%s\n", cwd, MODULE_NAME, missing_file, cwd, MODULE_NAME, missing_file, cwd, MODULE_NAME, missing_file, diff --git a/modules/pam_succeed_if/tst-pam_succeed_if-retval.c b/modules/pam_succeed_if/tst-pam_succeed_if-retval.c index d5f1fd1c..f665040b 100644 --- a/modules/pam_succeed_if/tst-pam_succeed_if-retval.c +++ b/modules/pam_succeed_if/tst-pam_succeed_if-retval.c @@ -31,10 +31,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so user = name\n" - "account required %s/.libs/%s.so user notin a:b\n" - "password required %s/.libs/%s.so user in x:name\n" - "session required %s/.libs/%s.so rhost eq 0\n", + "auth required %s/" LTDIR "%s.so user = name\n" + "account required %s/" LTDIR "%s.so user notin a:b\n" + "password required %s/" LTDIR "%s.so user in x:name\n" + "session required %s/" LTDIR "%s.so rhost eq 0\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -59,10 +59,10 @@ main(void) /* test some illegal conditions */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so user eq name\n" - "account required %s/.libs/%s.so user in a:b\n" - "password required %s/.libs/%s.so user notin x:name\n" - "session required %s/.libs/%s.so rhost eq []\n", + "auth required %s/" LTDIR "%s.so user eq name\n" + "account required %s/" LTDIR "%s.so user in a:b\n" + "password required %s/" LTDIR "%s.so user notin x:name\n" + "session required %s/" LTDIR "%s.so rhost eq []\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, diff --git a/modules/pam_time/tst-pam_time-retval.c b/modules/pam_time/tst-pam_time-retval.c index 281ac80d..3fcf4591 100644 --- a/modules/pam_time/tst-pam_time-retval.c +++ b/modules/pam_time/tst-pam_time-retval.c @@ -33,10 +33,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -65,10 +65,10 @@ main(void) ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so conffile=%s\n" - "account required %s/.libs/%s.so conffile=%s\n" - "password required %s/.libs/%s.so conffile=%s\n" - "session required %s/.libs/%s.so conffile=%s\n", + "auth required %s/" LTDIR "%s.so conffile=%s\n" + "account required %s/" LTDIR "%s.so conffile=%s\n" + "password required %s/" LTDIR "%s.so conffile=%s\n" + "session required %s/" LTDIR "%s.so conffile=%s\n", cwd, MODULE_NAME, config_file, cwd, MODULE_NAME, config_file, cwd, MODULE_NAME, config_file, diff --git a/modules/pam_warn/tst-pam_warn-retval.c b/modules/pam_warn/tst-pam_warn-retval.c index 49d6524e..48b1f311 100644 --- a/modules/pam_warn/tst-pam_warn-retval.c +++ b/modules/pam_warn/tst-pam_warn-retval.c @@ -31,10 +31,10 @@ main(void) /* PAM_IGNORE -> PAM_PERM_DENIED */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "account required %s/.libs/%s.so\n" - "password required %s/.libs/%s.so\n" - "session required %s/.libs/%s.so\n", + "auth required %s/" LTDIR "%s.so\n" + "account required %s/" LTDIR "%s.so\n" + "password required %s/" LTDIR "%s.so\n" + "session required %s/" LTDIR "%s.so\n", cwd, MODULE_NAME, cwd, MODULE_NAME, cwd, MODULE_NAME, @@ -56,14 +56,14 @@ main(void) /* PAM_IGNORE -> PAM_SUCCESS */ ASSERT_NE(NULL, fp = fopen(service_file, "w")); ASSERT_LT(0, fprintf(fp, "#%%PAM-1.0\n" - "auth required %s/.libs/%s.so\n" - "auth required %s/../pam_permit/.libs/pam_permit.so\n" - "account required %s/.libs/%s.so\n" - "account required %s/../pam_permit/.libs/pam_permit.so\n" - "password required %s/.libs/%s.so\n" - "password required %s/../pam_permit/.libs/pam_permit.so\n" - "session required %s/.libs/%s.so\n" - "session required %s/../pam_permit/.libs/pam_permit.so\n", + "auth required %s/" LTDIR "%s.so\n" + "auth required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "account required %s/" LTDIR "%s.so\n" + "account required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "password required %s/" LTDIR "%s.so\n" + "password required %s/../pam_permit/" LTDIR "pam_permit.so\n" + "session required %s/" LTDIR "%s.so\n" + "session required %s/../pam_permit/" LTDIR "pam_permit.so\n", cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, cwd, MODULE_NAME, cwd, |