]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Backport of SF patch 590294: os._execvpe security fix (Zack Weinberg).
authorGuido van Rossum <guido@python.org>
Thu, 8 Aug 2002 19:35:53 +0000 (19:35 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 8 Aug 2002 19:35:53 +0000 (19:35 +0000)
commitf1045ad2f263906e728cf52b1f610055c1d4f905
treedc4edf901a65003dcc5b0bc23f8181ec6f04da2a
parent0256444b79e7068a1bfa43a4a995036e376f13fb
Backport of SF patch 590294: os._execvpe security fix (Zack Weinberg).

1) Do not attempt to exec a file which does not exist
just to find out what error the operating system
returns. This is an exploitable race on all platforms
that support symbolic links.

2) Immediately re-raise the exception if we get an
error other than errno.ENOENT or errno.ENOTDIR. This
may need to be adapted for other platforms.
Lib/os.py