jbeverly / pam_ssh_agent_auth

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

Handle PAM_RUSER and PAM_USER being identical #21

Open AlD opened 4 years ago

AlD commented 4 years ago

Warns if PAM_RUSER and PAM_USER are identical. Bails out if additionally allow_user_owned_authorized_keys_file is enabled. If authorized_keys_file is allowed to be owned by user, and user is identical with ruser, this means that the calling user (i.e. ruser) can add arbitrary keys to it, thus rendering the whole PAM step useless.

Fixes #17, but will cause the module to stop working in the described situation. This is fine, as in this scenario, this module poses a massive security gap.