mirror of
https://github.com/golang/go
synced 2024-11-20 04:14:49 -07:00
build: fix check for selinux's allow_execstack on Fedora 16
Fedora 16 mounts selinux at /sys/fs/selinux, instead of the traditional /selinux. Check both locations for the selinux filesystem in make.bash Fixes #2448. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5373077
This commit is contained in:
parent
6d9c02aea3
commit
90c5070000
@ -50,8 +50,12 @@ chmod +x "$GOBIN"/gomake
|
|||||||
# TODO(brainman): delete this after 01/01/2012.
|
# TODO(brainman): delete this after 01/01/2012.
|
||||||
rm -f "$GOBIN"/gotest # remove old bash version of gotest on Windows
|
rm -f "$GOBIN"/gotest # remove old bash version of gotest on Windows
|
||||||
|
|
||||||
if [ -d /selinux -a -f /selinux/booleans/allow_execstack -a -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
|
# on Fedora 16 the selinux filesystem is mounted at /sys/fs/selinux,
|
||||||
if ! cat /selinux/booleans/allow_execstack | grep -c '^1 1$' >> /dev/null ; then
|
# so loop through the possible selinux mount points
|
||||||
|
for se_mount in /selinux /sys/fs/selinux
|
||||||
|
do
|
||||||
|
if [ -d $se_mount -a -f $se_mount/booleans/allow_execstack -a -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
|
||||||
|
if ! cat $se_mount/booleans/allow_execstack | grep -c '^1 1$' >> /dev/null ; then
|
||||||
echo "WARNING: the default SELinux policy on, at least, Fedora 12 breaks "
|
echo "WARNING: the default SELinux policy on, at least, Fedora 12 breaks "
|
||||||
echo "Go. You can enable the features that Go needs via the following "
|
echo "Go. You can enable the features that Go needs via the following "
|
||||||
echo "command (as root):"
|
echo "command (as root):"
|
||||||
@ -64,7 +68,8 @@ if [ -d /selinux -a -f /selinux/booleans/allow_execstack -a -x /usr/sbin/selinux
|
|||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
(
|
(
|
||||||
cd "$GOROOT"/src/pkg;
|
cd "$GOROOT"/src/pkg;
|
||||||
|
Loading…
Reference in New Issue
Block a user