I'm trying to add some functionality to Lixxia's fork of i3lock. I figured out how to read pam_conv messages and use cairo to display them on-screen.
I thought since my PAM stack is larger than most, it would be nice to show an icon to help identify how to authenticate. A password icon for trying your password, a fingerprint for fprintd, a USB key icon for pam-u2f, etc.
I've already tried pam_get_item(pam_handle, PAM_SERVICE, &service), but it only returns i3lock since that is the filename of the PAM stack.
Is there any way to get the name of the current module (like pam-fprintd.so or similar)?