diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-11-11 13:02:32 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-11-11 13:02:32 +0000 |
commit | 6d7212551aab91eaf28cf7fb0f6e76e3eb11e6f0 (patch) | |
tree | 39033dd23206a0b21ad59a5bec194d9f0c3cfee2 /usr.bin/ssh | |
parent | dc530fd86f2e0e8527101abd7e2e9646177825db (diff) |
make AuthorizedKeysFile2 fallback to AuthorizedKeysFile if AuthorizedKeysFile is specified.
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/servconf.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index e8347c48528..d6ce73dd5f3 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -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> @@ -212,8 +212,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; } /* Keyword tokens. */ |