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) |
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 @@ | |||
1 | /* $OpenBSD: sshd.c,v 1.517 2018/10/23 05:56:35 djm Exp $ */ | 1 | /* $OpenBSD: sshd.c,v 1.518 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 |
@@ -1624,7 +1624,7 @@ main(int ac, char **av) | |||
1624 | } | 1624 | } |
1625 | if (rexeced_flag || inetd_flag) | 1625 | if (rexeced_flag || inetd_flag) |
1626 | rexec_flag = 0; | 1626 | rexec_flag = 0; |
1627 | if (!test_flag && (rexec_flag && (av[0] == NULL || *av[0] != '/'))) | 1627 | if (!test_flag && rexec_flag && !path_absolute(av[0])) |
1628 | fatal("sshd re-exec requires execution with an absolute path"); | 1628 | fatal("sshd re-exec requires execution with an absolute path"); |
1629 | if (rexeced_flag) | 1629 | if (rexeced_flag) |
1630 | closefrom(REEXEC_MIN_FREE_FD); | 1630 | closefrom(REEXEC_MIN_FREE_FD); |