summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-11-16 03:26:01 +0000
committerDamien Miller <djm@mindrot.org>2018-11-16 14:37:33 +1100
commit2a35862e664afde774d4a72497d394fe7306ccb5 (patch)
tree501d6d170178b037829003b76cbd32e23e6080bb /readconf.c
parentd0d1dfa55be1c5c0d77ab3096b198a64235f936d (diff)
upstream: use path_absolute() for pathname checks; from Manoj Ampalam
OpenBSD-Commit-ID: 482ce71a5ea5c5f3bc4d00fd719481a6a584d925
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c
index 433811521..7850f2f59 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.300 2018/10/05 14:26:09 naddy Exp $ */ 1/* $OpenBSD: readconf.c,v 1.301 2018/11/16 03:26:01 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1521,7 +1521,7 @@ parse_keytypes:
1521 if (*arg == '~' && (flags & SSHCONF_USERCONF) == 0) 1521 if (*arg == '~' && (flags & SSHCONF_USERCONF) == 0)
1522 fatal("%.200s line %d: bad include path %s.", 1522 fatal("%.200s line %d: bad include path %s.",
1523 filename, linenum, arg); 1523 filename, linenum, arg);
1524 if (*arg != '/' && *arg != '~') { 1524 if (!path_absolute(arg) && *arg != '~') {
1525 xasprintf(&arg2, "%s/%s", 1525 xasprintf(&arg2, "%s/%s",
1526 (flags & SSHCONF_USERCONF) ? 1526 (flags & SSHCONF_USERCONF) ?
1527 "~/" _PATH_SSH_USER_DIR : SSHDIR, arg); 1527 "~/" _PATH_SSH_USER_DIR : SSHDIR, arg);