elements: Drop executable bits from environment files

Files in $element/environment.d are meant to be sourced, so drop
the executable bit. Moreover, drop the executable bit from a couple
of other scripts that are either meant to be sourced or simply because
they are configuration files.

Change-Id: I7f724dd9d409f4a835a136f12f48a84aa9acc41e
This commit is contained in:
Markos Chandras 2016-10-17 14:16:55 +01:00
parent ef1effd202
commit e22faa0f77
12 changed files with 5 additions and 1 deletions

View File

@ -156,11 +156,15 @@ for i in $(find elements -type f \
fi
fi
# check that environment files don't "set -x"
# check that environment files don't "set -x" and they have no executable
# bits set
if [[ "$i" =~ (environment.d) ]]; then
if grep -q "set -x" $i; then
error "Environment file $i should not set tracing"
fi
if [[ -x $i ]]; then
error "Environment file $i should not be marked as executable"
fi
fi
# check that sudo calls in phases run outside the chroot look

0
elements/centos/environment.d/00-bootloader.bash Executable file → Normal file
View File

0
elements/devuser/environment.d/50-devuser Executable file → Normal file
View File

View File

0
elements/gentoo/environment.d/00-gentoo-envars.bash Executable file → Normal file
View File

0
elements/manifests/environment.d/14-manifests Executable file → Normal file
View File

0
elements/pip-cache/environment.d/10-pip-cache Executable file → Normal file
View File

0
elements/ramdisk-base/extra-data.d/scripts/d/init-func Executable file → Normal file
View File

0
elements/redhat-common/environment.d/50-redhat-common Executable file → Normal file
View File