pam-rs icon indicating copy to clipboard operation
pam-rs copied to clipboard

Wrap pam_syslog() and add PamHandle wrapper

Open nresare opened this issue 1 year ago • 2 comments

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

nresare avatar Jul 31 '23 12:07 nresare

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

nathansgreen avatar Aug 11 '23 19:08 nathansgreen

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.

nresare avatar Aug 14 '23 18:08 nresare