summaryrefslogtreecommitdiff
path: root/transaction.c
diff options
context:
space:
mode:
authorMike Steinert <[email protected]>2022-09-17 16:16:24 -0500
committerGitHub <[email protected]>2022-09-17 16:16:24 -0500
commit313ea6f3baf83aaff875512dbd9905cb07537d84 (patch)
tree48a583e8773fbb8111e457b1997e211a067532b5 /transaction.c
parentf401703daf29acc07acb7d078755f4eb0bcd6e8c (diff)
parent376af17c468ef14f63444c5d1e5c157c7bb7ce1c (diff)
Merge pull request #5 from didrocks/start_confdirv1.1.0
Allow to define confdir
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;
+}