summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2010-03-12 01:06:25 +0000
committerdjm <djm@openbsd.org>2010-03-12 01:06:25 +0000
commitb1eef15cb186d81995d2872c0c381bc9ab489ed8 (patch)
tree24ce9acfcb0fdd6bb0bd3772704de8d9a4e00d9b
parentFix intended use of closefrom() so that we do indeed close fd 3 and up by (diff)
downloadwireguard-openbsd-b1eef15cb186d81995d2872c0c381bc9ab489ed8.tar.xz
wireguard-openbsd-b1eef15cb186d81995d2872c0c381bc9ab489ed8.zip
unbreak AuthorizedKeys option with a $HOME-relative path; reported by
vinschen AT redhat.com, ok dtucker@
-rw-r--r--usr.bin/ssh/servconf.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c
index 4b2870ae063..545c4ea49f4 100644
--- a/usr.bin/ssh/servconf.c
+++ b/usr.bin/ssh/servconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.c,v 1.204 2010/03/04 10:36:03 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.205 2010/03/12 01:06:25 djm Exp $ */
/*
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
* All rights reserved
@@ -1180,7 +1180,17 @@ process_server_config_line(ServerOptions *options, char *line,
charptr = (opcode == sAuthorizedKeysFile) ?
&options->authorized_keys_file :
&options->authorized_keys_file2;
- goto parse_filename;
+ arg = strdelim(&cp);
+ if (!arg || *arg == '\0')
+ fatal("%s line %d: missing file name.",
+ filename, linenum);
+ if (*activep && *charptr == NULL) {
+ *charptr = derelativise_path(arg);
+ /* increase optional counter */
+ if (intptr != NULL)
+ *intptr = *intptr + 1;
+ }
+ break;
case sClientAliveInterval:
intptr = &options->client_alive_interval;