diff options
author | Mike Steinert <[email protected]> | 2022-09-17 16:16:24 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2022-09-17 16:16:24 -0500 |
commit | 313ea6f3baf83aaff875512dbd9905cb07537d84 (patch) | |
tree | 48a583e8773fbb8111e457b1997e211a067532b5 /transaction.c | |
parent | f401703daf29acc07acb7d078755f4eb0bcd6e8c (diff) | |
parent | 376af17c468ef14f63444c5d1e5c157c7bb7ce1c (diff) |
Merge pull request #5 from didrocks/start_confdirv1.1.0
Allow to define confdir
Diffstat (limited to 'transaction.c')
-rw-r--r-- | transaction.c | 9 |
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; +} |