diff options
author | Vladimír Čunát <v@cunat.cz> | 2020-09-24 10:58:10 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2020-09-24 10:58:10 +0200 |
commit | a8cda1109046202a93bb55cb9f1d6900329e7fac (patch) | |
tree | c0b4ecafc3ea9cd35104470d52b55a6c1139d488 /pkgs/build-support/wrapper-common | |
parent | c5e7517f9102b42fc4148ca483dd2503ff96162b (diff) | |
parent | 5796715bb707bf88738f04a531925d13ee4cf6e7 (diff) |
Merge #97597: stdenv wrappers: improve purity checking
Diffstat (limited to 'pkgs/build-support/wrapper-common')
-rw-r--r-- | pkgs/build-support/wrapper-common/utils.bash | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/build-support/wrapper-common/utils.bash b/pkgs/build-support/wrapper-common/utils.bash index 8c4680a8e4460..d164982b43453 100644 --- a/pkgs/build-support/wrapper-common/utils.bash +++ b/pkgs/build-support/wrapper-common/utils.bash @@ -69,9 +69,13 @@ badPath() { # directory (including the build directory). test \ "$p" != "/dev/null" -a \ - "${p:0:${#NIX_STORE}}" != "$NIX_STORE" -a \ - "${p:0:4}" != "/tmp" -a \ - "${p:0:${#NIX_BUILD_TOP}}" != "$NIX_BUILD_TOP" + "${p#${NIX_STORE}}" = "$p" -a \ + "${p#${NIX_BUILD_TOP}}" = "$p" -a \ + "${p#/tmp}" = "$p" -a \ + "${p#${TMP:-/tmp}}" = "$p" -a \ + "${p#${TMPDIR:-/tmp}}" = "$p" -a \ + "${p#${TEMP:-/tmp}}" = "$p" -a \ + "${p#${TEMPDIR:-/tmp}}" = "$p" } expandResponseParams() { |