summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <williamh@gentoo.org>2012-05-15 18:11:26 +0000
committerWilliam Hubbs <williamh@gentoo.org>2012-05-15 18:11:26 +0000
commit8ebbe819cbe27dc8e6cc1eab5f3147f3fe503a4d (patch)
tree9592f55b91c570c5f192b8b9020930b727f52340 /dev-lang/go/files
parentDepend only once on ICU. (diff)
downloadgentoo-2-8ebbe819cbe27dc8e6cc1eab5f3147f3fe503a4d.tar.gz
gentoo-2-8ebbe819cbe27dc8e6cc1eab5f3147f3fe503a4d.tar.bz2
gentoo-2-8ebbe819cbe27dc8e6cc1eab5f3147f3fe503a4d.zip
Initial commit for bug #342505.
I would like to thank johnny@9souldier.org for the initial report and ebuild. Also, I would like to thank powerman-asdf@yandex.ru for the original hardened patch and everyone else who worked with me on the bug so we could get this into the tree. (Portage version: 2.2.0_alpha104/cvs/Linux i686)
Diffstat (limited to 'dev-lang/go/files')
-rw-r--r--dev-lang/go/files/go-1.0.1-hardened.patch55
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
+