diff --git a/pam_ssh_agent_auth-0.9.3-agent_structure.patch b/pam_ssh_agent_auth-0.9.3-agent_structure.patch index 66e9908..4c7a712 100644 --- a/pam_ssh_agent_auth-0.9.3-agent_structure.patch +++ b/pam_ssh_agent_auth-0.9.3-agent_structure.patch @@ -9,7 +9,7 @@ diff -up openssh-6.8p1/pam_ssh_agent_auth-0.9.3/iterate_ssh_agent_keys.c.psaa-ag #include "ssh.h" #include #include -@@ -177,34 +178,40 @@ int +@@ -177,34 +178,41 @@ int find_authorized_keys(uid_t uid) { Identity *id; @@ -31,7 +31,7 @@ diff -up openssh-6.8p1/pam_ssh_agent_auth-0.9.3/iterate_ssh_agent_keys.c.psaa-ag + if (r != SSH_ERR_AGENT_NO_IDENTITIES) + fprintf(stderr, "error fetching identities for " + "protocol %d: %s\n", 2, ssh_err(r)); -+ } else ++ } else { + for (i = 0; i < idlist->nkeys; i++) { - if(key != NULL) { @@ -56,6 +56,7 @@ diff -up openssh-6.8p1/pam_ssh_agent_auth-0.9.3/iterate_ssh_agent_keys.c.psaa-ag + ssh_free_identitylist(idlist); + ssh_close_authentication_socket(ac->fd); + free(ac); ++ } } else { verbose("No ssh-agent could be contacted");