Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pam_user_authorized_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ parse_authorized_key_file(const char *user,
int
pam_user_key_allowed(const char *ruser, Key * key)
{
struct passwd *pw;
return
pamsshagentauth_user_key_allowed2(getpwuid(authorized_keys_file_allowed_owner_uid),
key, authorized_keys_file)
|| pamsshagentauth_user_key_allowed2(getpwuid(0), key,
authorized_keys_file)
( (pw = getpwuid(authorized_keys_file_allowed_owner_uid)) &&
pamsshagentauth_user_key_allowed2(pw, key, authorized_keys_file))
|| ((pw = getpwuid(0)) &&
pamsshagentauth_user_key_allowed2(pw, key, authorized_keys_file))
|| pamsshagentauth_user_key_command_allowed2(authorized_keys_command,
authorized_keys_command_user,
getpwnam(ruser), key);
Expand Down