From 3cebaf843847fdc35d73ab7f42d79fcd2e3163ad Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 12 Mar 2010 01:06:26 +0000 Subject: unbreak AuthorizedKeys option with a $HOME-relative path; reported by vinschen AT redhat.com, ok dtucker@ --- usr.bin/ssh/servconf.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'usr.bin/ssh') 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 , 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; -- cgit v1.2.3