mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-09-11 13:30:43 +03:00
add support for identityagent ssh_config option
This commit adds an `agent_socket` field to the session options and connects the config parser to that option. `SSH_OPTIONS_IDENTITY_AGENT` is added to allow applications to set this option for themselves. agent.c is updated to take the `agent_socket` value in preference to the `SSH_AUTH_SOCK` environment variable. Signed-off-by: Wez Furlong <wez@fb.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
899ec9e519
commit
51a53cc6d4
@@ -104,7 +104,7 @@ static struct ssh_config_keyword_table_s ssh_config_keyword_table[] = {
|
||||
{ "hostbasedacceptedalgorithms", SOC_UNSUPPORTED},
|
||||
{ "hostkeyalias", SOC_UNSUPPORTED},
|
||||
{ "identitiesonly", SOC_UNSUPPORTED},
|
||||
{ "identityagent", SOC_UNSUPPORTED},
|
||||
{ "identityagent", SOC_IDENTITYAGENT},
|
||||
{ "ipqos", SOC_UNSUPPORTED},
|
||||
{ "kbdinteractivedevices", SOC_UNSUPPORTED},
|
||||
{ "nohostauthenticationforlocalhost", SOC_UNSUPPORTED},
|
||||
@@ -1161,6 +1161,12 @@ ssh_config_parse_line(ssh_session session,
|
||||
SSH_LOG(SSH_LOG_INFO, "Unknown option: %s, line: %d",
|
||||
keyword, count);
|
||||
break;
|
||||
case SOC_IDENTITYAGENT:
|
||||
p = ssh_config_get_str_tok(&s, NULL);
|
||||
if (p && *parsing) {
|
||||
ssh_options_set(session, SSH_OPTIONS_IDENTITY_AGENT, p);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ssh_set_error(session, SSH_FATAL, "ERROR - unimplemented opcode: %d",
|
||||
opcode);
|
||||
|
Reference in New Issue
Block a user