forked from rpms/openssh
		
	Fix pam_ssh_agent_auth after rebase (#1251777)
This commit is contained in:
		
							parent
							
								
									1d50678457
								
							
						
					
					
						commit
						405790ef61
					
				| @ -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 "ssh.h" | ||||||
|  #include <stdio.h> |  #include <stdio.h> | ||||||
|  #include <sys/types.h> |  #include <sys/types.h> | ||||||
| @@ -177,34 +178,40 @@ int
 | @@ -177,34 +178,41 @@ int
 | ||||||
|  find_authorized_keys(uid_t uid) |  find_authorized_keys(uid_t uid) | ||||||
|  { |  { | ||||||
|      Identity *id; |      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)
 | +			if (r != SSH_ERR_AGENT_NO_IDENTITIES)
 | ||||||
| +				fprintf(stderr, "error fetching identities for "
 | +				fprintf(stderr, "error fetching identities for "
 | ||||||
| +				    "protocol %d: %s\n", 2, ssh_err(r));
 | +				    "protocol %d: %s\n", 2, ssh_err(r));
 | ||||||
| +		} else
 | +		} else {
 | ||||||
| +		for (i = 0; i < idlist->nkeys; i++)
 | +		for (i = 0; i < idlist->nkeys; i++)
 | ||||||
|          { |          { | ||||||
| -            if(key != NULL) {
 | -            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_free_identitylist(idlist);
 | ||||||
| +        ssh_close_authentication_socket(ac->fd);
 | +        ssh_close_authentication_socket(ac->fd);
 | ||||||
| +        free(ac);
 | +        free(ac);
 | ||||||
|  | +        }
 | ||||||
|      } |      } | ||||||
|      else { |      else { | ||||||
|          verbose("No ssh-agent could be contacted"); |          verbose("No ssh-agent could be contacted"); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user