Gentoo Archives: gentoo-portage-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] ebuild.sh: Completely ban external commands in global scope
Date: Sat, 09 Sep 2017 05:16:42
Message-Id: 22963.31027.263779.527520@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-portage-dev] [PATCH] ebuild.sh: Completely ban external commands in global scope by "Robin H. Johnson"
1 >>>>> On Fri, 8 Sep 2017, Robin H Johnson wrote:
2
3 > On Thu, Aug 31, 2017 at 10:45:42PM +0200, Michał Górny wrote:
4 >> + export PATH=/dev/null
5 > Minor nitpick: The Single UNIX spec says that PATH is a set of
6 > prefixes, and that they're treated as directories.
7 > http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html
8
9 > I think it might be good to use either a non-existing path, or a
10 > known empty directory (/var/empty), rather than /dev/null which DOES
11 > exist.
12
13 Is /var/empty standard? On my system here, it belongs to
14 net-misc/openssh.
15
16 Also any /dev/null/foo is guaranteed not to exist, so I don't see how
17 pathname resolution could possibly succeed when PATH is /dev/null.
18
19 Ulrich