Fix pam_ssh_agent_auth after rebase (#1251777)

This commit is contained in:
Jakub Jelen 2015-08-11 17:57:59 +02:00
parent 1d50678457
commit 405790ef61

View File

@ -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 <stdio.h>
#include <sys/types.h>
@@ -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");