diff options
author | djm@openbsd.org <djm@openbsd.org> | 2018-11-16 03:26:01 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-11-16 14:37:33 +1100 |
commit | 2a35862e664afde774d4a72497d394fe7306ccb5 (patch) | |
tree | 501d6d170178b037829003b76cbd32e23e6080bb /sshd.c | |
parent | d0d1dfa55be1c5c0d77ab3096b198a64235f936d (diff) | |
download | openssh-git-2a35862e664afde774d4a72497d394fe7306ccb5.tar.gz |
upstream: use path_absolute() for pathname checks; from Manoj Ampalam
OpenBSD-Commit-ID: 482ce71a5ea5c5f3bc4d00fd719481a6a584d925
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: sshd.c,v 1.517 2018/10/23 05:56:35 djm Exp $ */ +/* $OpenBSD: sshd.c,v 1.518 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 @@ -1624,7 +1624,7 @@ main(int ac, char **av) } if (rexeced_flag || inetd_flag) rexec_flag = 0; - if (!test_flag && (rexec_flag && (av[0] == NULL || *av[0] != '/'))) + if (!test_flag && rexec_flag && !path_absolute(av[0])) fatal("sshd re-exec requires execution with an absolute path"); if (rexeced_flag) closefrom(REEXEC_MIN_FREE_FD); |