summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-11-13 04:48:00 +0000
committerSam James <sam@gentoo.org>2021-11-13 04:49:06 +0000
commit6c4d82dde134b4e947480759c125e9389f09ae01 (patch)
treeb3a263a26430021689100c439e7b1b8314ffa24a
parentgcc-config: Check writability in env.d instead of EROOT (diff)
downloadgcc-config-6c4d82dde134b4e947480759c125e9389f09ae01.tar.gz
gcc-config-6c4d82dde134b4e947480759c125e9389f09ae01.tar.bz2
gcc-config-6c4d82dde134b4e947480759c125e9389f09ae01.zip
gcc-config: add comment explaining SELinux-related writable checkv2.5
Bug: https://bugs.gentoo.org/823203 Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-xgcc-config5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc-config b/gcc-config
index 70bb388..eff9cca 100755
--- a/gcc-config
+++ b/gcc-config
@@ -668,6 +668,11 @@ switch_profile() {
# Make sure we have write access to the dirs. Do not require `root`
# so that we work with prefix/cross/etc... setups that run as user.
+ #
+ # [It's important we use ${ENV_D} and not e.g. ${EROOT} because for, say
+ # SELinux, we may not actually be able to write to ${EROOT}, but would
+ # be allowed for specific paths like the gcc wrappers we need to
+ # modify. bug #823203.]
[[ ! -w ${ENV_D} ]] && die "need write access to ${ENV_D}"
if is_cross_compiler ; then