diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c index 36b8efecf..747edde6c 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | /* $OpenBSD: servconf.c,v 1.239 2013/05/17 00:13:14 djm Exp $ */ | 2 | /* $OpenBSD: servconf.c,v 1.240 2013/07/19 07:37:48 markus Exp $ */ |
3 | /* | 3 | /* |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
5 | * All rights reserved | 5 | * All rights reserved |
@@ -79,6 +79,7 @@ initialize_server_options(ServerOptions *options) | |||
79 | options->address_family = -1; | 79 | options->address_family = -1; |
80 | options->num_host_key_files = 0; | 80 | options->num_host_key_files = 0; |
81 | options->num_host_cert_files = 0; | 81 | options->num_host_cert_files = 0; |
82 | options->host_key_agent = NULL; | ||
82 | options->pid_file = NULL; | 83 | options->pid_file = NULL; |
83 | options->server_key_bits = -1; | 84 | options->server_key_bits = -1; |
84 | options->login_grace_time = -1; | 85 | options->login_grace_time = -1; |
@@ -344,7 +345,7 @@ typedef enum { | |||
344 | sRevokedKeys, sTrustedUserCAKeys, sAuthorizedPrincipalsFile, | 345 | sRevokedKeys, sTrustedUserCAKeys, sAuthorizedPrincipalsFile, |
345 | sKexAlgorithms, sIPQoS, sVersionAddendum, | 346 | sKexAlgorithms, sIPQoS, sVersionAddendum, |
346 | sAuthorizedKeysCommand, sAuthorizedKeysCommandUser, | 347 | sAuthorizedKeysCommand, sAuthorizedKeysCommandUser, |
347 | sAuthenticationMethods, | 348 | sAuthenticationMethods, sHostKeyAgent, |
348 | sDeprecated, sUnsupported | 349 | sDeprecated, sUnsupported |
349 | } ServerOpCodes; | 350 | } ServerOpCodes; |
350 | 351 | ||
@@ -369,6 +370,7 @@ static struct { | |||
369 | { "port", sPort, SSHCFG_GLOBAL }, | 370 | { "port", sPort, SSHCFG_GLOBAL }, |
370 | { "hostkey", sHostKeyFile, SSHCFG_GLOBAL }, | 371 | { "hostkey", sHostKeyFile, SSHCFG_GLOBAL }, |
371 | { "hostdsakey", sHostKeyFile, SSHCFG_GLOBAL }, /* alias */ | 372 | { "hostdsakey", sHostKeyFile, SSHCFG_GLOBAL }, /* alias */ |
373 | { "hostkeyagent", sHostKeyAgent, SSHCFG_GLOBAL }, | ||
372 | { "pidfile", sPidFile, SSHCFG_GLOBAL }, | 374 | { "pidfile", sPidFile, SSHCFG_GLOBAL }, |
373 | { "serverkeybits", sServerKeyBits, SSHCFG_GLOBAL }, | 375 | { "serverkeybits", sServerKeyBits, SSHCFG_GLOBAL }, |
374 | { "logingracetime", sLoginGraceTime, SSHCFG_GLOBAL }, | 376 | { "logingracetime", sLoginGraceTime, SSHCFG_GLOBAL }, |
@@ -978,6 +980,17 @@ process_server_config_line(ServerOptions *options, char *line, | |||
978 | } | 980 | } |
979 | break; | 981 | break; |
980 | 982 | ||
983 | case sHostKeyAgent: | ||
984 | charptr = &options->host_key_agent; | ||
985 | arg = strdelim(&cp); | ||
986 | if (!arg || *arg == '\0') | ||
987 | fatal("%s line %d: missing socket name.", | ||
988 | filename, linenum); | ||
989 | if (*activep && *charptr == NULL) | ||
990 | *charptr = !strcmp(arg, SSH_AUTHSOCKET_ENV_NAME) ? | ||
991 | xstrdup(arg) : derelativise_path(arg); | ||
992 | break; | ||
993 | |||
981 | case sHostCertificate: | 994 | case sHostCertificate: |
982 | intptr = &options->num_host_cert_files; | 995 | intptr = &options->num_host_cert_files; |
983 | if (*intptr >= MAX_HOSTKEYS) | 996 | if (*intptr >= MAX_HOSTKEYS) |
@@ -2011,6 +2024,7 @@ dump_config(ServerOptions *o) | |||
2011 | dump_cfg_string(sVersionAddendum, o->version_addendum); | 2024 | dump_cfg_string(sVersionAddendum, o->version_addendum); |
2012 | dump_cfg_string(sAuthorizedKeysCommand, o->authorized_keys_command); | 2025 | dump_cfg_string(sAuthorizedKeysCommand, o->authorized_keys_command); |
2013 | dump_cfg_string(sAuthorizedKeysCommandUser, o->authorized_keys_command_user); | 2026 | dump_cfg_string(sAuthorizedKeysCommandUser, o->authorized_keys_command_user); |
2027 | dump_cfg_string(sHostKeyAgent, o->host_key_agent); | ||
2014 | 2028 | ||
2015 | /* string arguments requiring a lookup */ | 2029 | /* string arguments requiring a lookup */ |
2016 | dump_cfg_string(sLogLevel, log_level_name(o->log_level)); | 2030 | dump_cfg_string(sLogLevel, log_level_name(o->log_level)); |