You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
The text was updated successfully, but these errors were encountered:
Hey sorry for the late reply!
To be honest, I cannot completely recollect if this change was related to openPAM but I think so. We are figuring out how to properly deal with this in #18. Afterwards all functions present in the respective implementation should be available.
Regarding pam_error I am also leaning to implementing this in pam to minimize friction with bindgen.
I currently don't have a timeline for this, but would be happy to accept PRs once the "multi-implementation"-support is landed!
Functions like
pam_prompt
andpam_syslog
are blocklisted inbuild.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 callingpam_error
in C, which is currently not available with thepam-sys
and therefore also withpam
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 thepam
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 thepam
crate does require a wrapping function anyways.I do have patches ready for exporting
pam_prompt
andpam_syslog
as well as usingpam_prompt
in yourpam
crate. If there is no particular reason why the functionspam_prompt
andpam_syslog
were excluded in the first place, I would submit these patches as PRs.The text was updated successfully, but these errors were encountered: