diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2019-12-15 20:57:16 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2019-12-15 20:57:16 +0000 |
commit | 543a6349b5b86db9ac8387be2908376ded589de8 (patch) | |
tree | 4ea225a6fe576c71370fb8a0cca66f00e5319e7e | |
parent | 03b1089c3ebeda39312d1852bd07b1d0032c42f4 (diff) |
do not attempt to find an absolute path for sshd_config
SecurityKeyProvider=internal - unbreaks cfgparse regress test
-rw-r--r-- | usr.bin/ssh/servconf.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index da9b4f85e93..bd8c926ae29 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -1,5 +1,5 @@ -/* $OpenBSD: servconf.c,v 1.355 2019/12/15 18:57:30 djm Exp $ */ +/* $OpenBSD: servconf.c,v 1.356 2019/12/15 20:57:15 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -1969,7 +1969,18 @@ process_server_config_line(ServerOptions *options, char *line, case sSecurityKeyProvider: charptr = &options->sk_provider; - goto parse_filename; + arg = strdelim(&cp); + if (!arg || *arg == '\0') + fatal("%s line %d: missing file name.", + filename, linenum); + if (*activep && *charptr == NULL) { + *charptr = strcasecmp(arg, "internal") == 0 ? + xstrdup(arg) : derelativise_path(arg); + /* increase optional counter */ + if (intptr != NULL) + *intptr = *intptr + 1; + } + break; case sIPQoS: arg = strdelim(&cp); |