commit:     6c4d82dde134b4e947480759c125e9389f09ae01
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 13 04:48:00 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 13 04:49:06 2021 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=6c4d82dd

gcc-config: add comment explaining SELinux-related writable check

Bug: https://bugs.gentoo.org/823203
Signed-off-by: Sam James <sam <AT> gentoo.org>

 gcc-config | 5 +++++
 1 file changed, 5 insertions(+)

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

Reply via email to