summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/readconf.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2018-11-16 03:26:01 +0000
committerdjm <djm@openbsd.org>2018-11-16 03:26:01 +0000
commit655987b9ca8c40c15e95707cdf42c2f6dbd94e1f (patch)
tree28a0ef4a78ba482b2597a55b54d5be34a1410c70 /usr.bin/ssh/readconf.c
parentdisallow empty incoming filename or ones that refer to the current (diff)
downloadwireguard-openbsd-655987b9ca8c40c15e95707cdf42c2f6dbd94e1f.tar.xz
wireguard-openbsd-655987b9ca8c40c15e95707cdf42c2f6dbd94e1f.zip
use path_absolute() for pathname checks; from Manoj Ampalam
Diffstat (limited to 'usr.bin/ssh/readconf.c')
-rw-r--r--usr.bin/ssh/readconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c
index f23dcf0897e..c69d529b5c2 100644
--- a/usr.bin/ssh/readconf.c
+++ b/usr.bin/ssh/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.300 2018/10/05 14:26:09 naddy Exp $ */
+/* $OpenBSD: readconf.c,v 1.301 2018/11/16 03:26:01 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1506,7 +1506,7 @@ parse_keytypes:
if (*arg == '~' && (flags & SSHCONF_USERCONF) == 0)
fatal("%.200s line %d: bad include path %s.",
filename, linenum, arg);
- if (*arg != '/' && *arg != '~') {
+ if (!path_absolute(arg) && *arg != '~') {
xasprintf(&arg2, "%s/%s",
(flags & SSHCONF_USERCONF) ?
"~/" _PATH_SSH_USER_DIR : SSHDIR, arg);