aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-09-30 12:35:40 +0200
committerAndreas Schneider <asn@cryptomilk.org>2015-09-30 12:35:40 +0200
commitbab68880c38c2e79586f7ce1b71ea3326bae1047 (patch)
treee219622f697ded8475373f6d18e378af3723be61
parent69fd3a430787abb37497b27bd2b43bb9223eeca6 (diff)
downloadpam_wrapper-master-wip.tar.gz
pam_wrapper-master-wip.tar.xz
pam_wrapper-master-wip.zip
pwrap: Handle absolute path linksmaster-wip
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--src/pam_wrapper.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/pam_wrapper.c b/src/pam_wrapper.c
index 7ea9185..4fb7710 100644
--- a/src/pam_wrapper.c
+++ b/src/pam_wrapper.c
@@ -741,11 +741,18 @@ static void pwrap_init(void)
exit(1);
}
- snprintf(pam_path,
- sizeof(pam_path),
- "/usr/lib%s/%s",
- suffix,
- pam_library);
+ if (pam_library[0] == '/') {
+ snprintf(pam_path,
+ sizeof(pam_path),
+ "%s",
+ pam_library);
+ } else {
+ snprintf(pam_path,
+ sizeof(pam_path),
+ "/usr/lib%s/%s",
+ suffix,
+ pam_library);
+ }
PWRAP_LOG(PWRAP_LOG_DEBUG, "Copy %s to %s", pam_path, pwrap.pam_library);
rc = p_copy(pam_path, pwrap.pam_library, pwrap.config_dir, 0644);