jbeverly / pam_ssh_agent_auth

Moving pam_ssh_agent_auth to github as primary development location
Other
98 stars 27 forks source link

Add PAM_RUSER format specificier #7

Open msantos opened 6 years ago

msantos commented 6 years ago

Add a new "%r" format specifier to represent the PAM remote user:

auth sufficient pam_ssh_agent_auth.so file=/etc/keys/%r

This change allows programs, like su, that set RUSER to the origin user and USER to the destination user, to name the key according to the user calling the program:

# auser -> root
/etc/keys/%r # equivalent to /etc/keys/auser
/etc/keys/%u # equivalent to /etc/keys/root
msantos commented 4 years ago

specificier -> specifier