diff options
author | djm <djm> | 2001-11-12 00:14:35 +0000 |
---|---|---|
committer | djm <djm> | 2001-11-12 00:14:35 +0000 |
commit | 521e81bb79bb43ff64635bc720a341c35ab99743 (patch) | |
tree | 5d3d7c142abd0552524f1b8ad2c9a5c385c0f990 /servconf.c | |
parent | a4fea88159ca6f189f8fb46d404d526c19f6e417 (diff) | |
download | openssh-521e81bb79bb43ff64635bc720a341c35ab99743.tar.gz |
- markus@cvs.openbsd.org 2001/11/11 13:02:31
[servconf.c]
make AuthorizedKeysFile2 fallback to AuthorizedKeysFile if AuthorizedKeysFile is specified.
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.89 2001/08/16 19:18:34 jakob Exp $"); +RCSID("$OpenBSD: servconf.c,v 1.90 2001/11/11 13:02:31 markus Exp $"); #if defined(KRB4) || defined(KRB5) #include <krb.h> @@ -213,8 +213,15 @@ fill_default_server_options(ServerOptions *options) options->client_alive_count_max = 3; if (options->authorized_keys_file == NULL) options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS; - if (options->authorized_keys_file2 == NULL) - options->authorized_keys_file2 = _PATH_SSH_USER_PERMITTED_KEYS2; + if (options->authorized_keys_file2 == NULL) { + /* authorized_keys_file2 falls back to authorized_keys_file */ + if (options->authorized_keys_file != NULL) + options->authorized_keys_file2 = options->authorized_keys_file; + else + options->authorized_keys_file2 = _PATH_SSH_USER_PERMITTED_KEYS2; + } + if (options->authorized_keys_file == NULL) + options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS; if (options->pam_authentication_via_kbd_int == -1) options->pam_authentication_via_kbd_int = 0; } |