summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-03-22 05:52:26 +1100
committerDamien Miller <djm@mindrot.org>2010-03-22 05:52:26 +1100
commitc4cb47bc53434612c41333695b15350724d60d6a (patch)
tree4fb604225158243c157301c9a8a54d1c4e22db87
parente513a911952901dc8bcaa76fcfba7bc45f23daae (diff)
- djm@cvs.openbsd.org 2010/03/12 01:06:25
[servconf.c] unbreak AuthorizedKeys option with a $HOME-relative path; reported by vinschen AT redhat.com, ok dtucker@
-rw-r--r--ChangeLog4
-rw-r--r--servconf.c14
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ac93d23c..3112f645 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,10 @@
[auth2-pubkey.c]
correct certificate logging and make it more consistent between
authorized_keys and TrustedCAKeys; ok markus@
+ - djm@cvs.openbsd.org 2010/03/12 01:06:25
+ [servconf.c]
+ unbreak AuthorizedKeys option with a $HOME-relative path; reported by
+ vinschen AT redhat.com, ok dtucker@
20100314
- (djm) [ssh-pkcs11-helper.c] Move #ifdef to after #defines to fix
diff --git a/servconf.c b/servconf.c
index f9e2f2df..e09e0f1c 100644
--- a/servconf.c
+++ b/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
@@ -1223,7 +1223,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;