Description
Functions like pam_prompt
and pam_syslog
are blocklisted in build.rs
.
Is there any particular reason for that? I think when writing a pam module the function pam_prompt
is the intended way to communicate with the user like when calling pam_error
in C, which is currently not available with the pam-sys
and therefore also with pam
crates.
I saw that the initial blocking of those functions were comitted in this commit, which indicates that there is an issue with openPAM/freeBSD. Maybe it is sufficient to exclude those functions for this platform?
Furthermore, pam_error
does not get exported, probably due to this rust-bindgen issue.
My current workaround is to implement functions like pam_error
in the pam
crate. An alternative would be to re-implement those functions as a macro in this crate, but I personally like the first method more as it is more explicit and the current structure of the pam
crate does require a wrapping function anyways.
I do have patches ready for exporting pam_prompt
and pam_syslog
as well as using pam_prompt
in your pam
crate. If there is no particular reason why the functions pam_prompt
and pam_syslog
were excluded in the first place, I would submit these patches as PRs.