diff options
Diffstat (limited to 'dev-lang/go/files/go-1.0.1-hardened.patch')
-rw-r--r-- | dev-lang/go/files/go-1.0.1-hardened.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/dev-lang/go/files/go-1.0.1-hardened.patch b/dev-lang/go/files/go-1.0.1-hardened.patch new file mode 100644 index 000000000000..220bc1b6e4c5 --- /dev/null +++ b/dev-lang/go/files/go-1.0.1-hardened.patch @@ -0,0 +1,55 @@ +diff -r 95d6aec944d4 src/all.bash +--- a/src/all.bash Tue May 15 12:00:13 2012 +1000 ++++ b/src/all.bash Tue May 15 08:46:50 2012 -0500 +@@ -8,6 +8,6 @@ + echo 'all.bash must be run from $GOROOT/src' 1>&2 + exit 1 + fi +-. ./make.bash --no-banner ++. ./make.bash $@ --no-banner + bash run.bash --no-rebuild --banner + $GOTOOLDIR/dist banner # print build info +diff -r 95d6aec944d4 src/make.bash +--- a/src/make.bash Tue May 15 12:00:13 2012 +1000 ++++ b/src/make.bash Tue May 15 08:46:50 2012 -0500 +@@ -116,6 +116,40 @@ + ./cmd/dist/dist bootstrap $buildall -v # builds go_bootstrap + # Delay move of dist tool to now, because bootstrap may clear tool directory. + mv cmd/dist/dist "$GOTOOLDIR"/dist ++if [ "$1" = "--pax-kernel" ]; then ++ shift ++ if [ -f "$GOTOOLDIR"/8l ]; then ++ mv "$GOTOOLDIR"/8l{,.orig} ++ cat <<'EOF' >"$GOTOOLDIR"/8l ++#!/bin/bash ++BIN="8.out" ++for (( i = 1 ; i <= $# ; i++ )); do ++ if [ "x${!i}" = "x-o" ]; then ++ i=$(( i + 1 )) ++ BIN="${!i}" ++ fi ++done ++$(dirname $0)/8l.orig "$@" && paxctl -cm "$BIN" &>/dev/null ++EOF ++ chmod +x "$GOTOOLDIR"/8l ++ fi ++ if [ -f "$GOTOOLDIR"/6l ]; then ++ mv "$GOTOOLDIR"/6l{,.orig} ++ cat <<'EOF' >"$GOTOOLDIR"/6l ++#!/bin/bash ++BIN="6.out" ++for (( i = 1 ; i <= $# ; i++ )); do ++ if [ "x${!i}" = "x-o" ]; then ++ i=$(( i + 1 )) ++ BIN="${!i}" ++ fi ++done ++$(dirname $0)/6l.orig "$@" && paxctl -cm "$BIN" &>/dev/null ++EOF ++ chmod +x "$GOTOOLDIR"/6l ++ fi ++ paxctl -cm "$GOTOOLDIR"/go_bootstrap &>/dev/null ++fi + "$GOTOOLDIR"/go_bootstrap clean -i std + echo + |