summaryrefslogtreecommitdiff
path: root/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'transaction.c')
-rw-r--r--transaction.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/transaction.c b/transaction.c
index c8ca4d2..07155e1 100644
--- a/transaction.c
+++ b/transaction.c
@@ -50,3 +50,12 @@ void init_pam_conv(struct pam_conv *conv, long c)
conv->conv = cb_pam_conv;
conv->appdata_ptr = (void *)c;
}
+
+// pam_start_confdir is a recent PAM api to declare a confdir (mostly for tests)
+// weaken the linking dependency to detect if it’s present.
+int pam_start_confdir(const char *service_name, const char *user, const struct pam_conv *pam_conversation, const char *confdir, pam_handle_t **pamh) __attribute__ ((weak));
+int check_pam_start_confdir(void) {
+ if (pam_start_confdir == NULL)
+ return 1;
+ return 0;
+}