pam-rs
pam-rs copied to clipboard
Wrap pam_syslog() and add PamHandle wrapper
PAM modules are expected to log to syslog using the pam_syslog() function. This change makes that function available and implements PamHandle.log() that gives the function a rust friendly API
pam_syslog
is specific to Linux PAM[1]. It does not exist on MacOS, and seems absent from Illumos[2] as well.
[1] https://www.opennet.ru/man.shtml?topic=pam_syslog&category=3 [2] https://illumos.org/man/3LIB/libpam
Oh, I see. Would you be interested in me trying to introduce conditionality of this functionality in the code base, or would you prefer to not accept the change and continue to have this create implement the common subset of functionality?
Parties looking for this type of functionality might be interested to have a look at my pure rust re-implementation of pam_syslog() like logging here. Unfortunately, there is no API to obtain the pamh->mod_name
, so that needs to be supplied manually.