version 1.265, 2015/09/04 04:55:24 |
version 1.266, 2015/11/15 22:26:49 |
|
|
#include "version.h" |
#include "version.h" |
#include "authfile.h" |
#include "authfile.h" |
#include "ssherr.h" |
#include "ssherr.h" |
|
#include "authfd.h" |
|
|
char *client_version_string = NULL; |
char *client_version_string = NULL; |
char *server_version_string = NULL; |
char *server_version_string = NULL; |
|
|
return (1); |
return (1); |
|
|
return (WEXITSTATUS(status)); |
return (WEXITSTATUS(status)); |
|
} |
|
|
|
void |
|
maybe_add_key_to_agent(char *authfile, Key *private, char *comment, |
|
char *passphrase) |
|
{ |
|
int auth_sock = -1, r; |
|
|
|
if (options.add_keys_to_agent == 0) |
|
return; |
|
|
|
if ((r = ssh_get_authentication_socket(&auth_sock)) != 0) { |
|
debug3("no authentication agent, not adding key"); |
|
return; |
|
} |
|
|
|
if (options.add_keys_to_agent == 2 && |
|
!ask_permission("Add key %s (%s) to agent?", authfile, comment)) { |
|
debug3("user denied adding this key"); |
|
return; |
|
} |
|
|
|
if ((r = ssh_add_identity_constrained(auth_sock, private, comment, 0, |
|
(options.add_keys_to_agent == 3))) == 0) |
|
debug("identity added to agent: %s", authfile); |
|
else |
|
debug("could not add identity to agent: %s (%d)", authfile, r); |
} |
} |