diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-10-02 01:13:25 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-10-02 01:13:25 +0000 |
| commit | f38978765535e8c844371dbcd8e2ae1ace135e08 (patch) | |
| tree | 8f6f73cc41ec340be45959fae67da4c6abec1e21 /pam_ssh_agent_auth-0.10.2-dereference.patch | |
| parent | 151bd95e0af0e9382ca9065b0d6cc6d62f1ac794 (diff) | |
automatic import of opensshopeneuler20.03
Diffstat (limited to 'pam_ssh_agent_auth-0.10.2-dereference.patch')
| -rw-r--r-- | pam_ssh_agent_auth-0.10.2-dereference.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pam_ssh_agent_auth-0.10.2-dereference.patch b/pam_ssh_agent_auth-0.10.2-dereference.patch new file mode 100644 index 0000000..bf49c37 --- /dev/null +++ b/pam_ssh_agent_auth-0.10.2-dereference.patch @@ -0,0 +1,20 @@ +diff --git a/pam_ssh_agent_auth-0.10.2/pam_user_authorized_keys.c b/pam_ssh_agent_auth-0.10.2/pam_user_authorized_keys.c +--- a/pam_ssh_agent_auth-0.10.2/pam_user_authorized_keys.c ++++ b/pam_ssh_agent_auth-0.10.2/pam_user_authorized_keys.c +@@ -158,11 +158,12 @@ parse_authorized_key_file(const char *user, + int + pam_user_key_allowed(const char *ruser, struct sshkey * 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); |
