summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authordjm <djm>2001-11-12 00:14:35 +0000
committerdjm <djm>2001-11-12 00:14:35 +0000
commit521e81bb79bb43ff64635bc720a341c35ab99743 (patch)
tree5d3d7c142abd0552524f1b8ad2c9a5c385c0f990 /servconf.c
parenta4fea88159ca6f189f8fb46d404d526c19f6e417 (diff)
downloadopenssh-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.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/servconf.c b/servconf.c
index 6297143f..d82e8427 100644
--- a/servconf.c
+++ b/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>
@@ -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;
}