From ef5177349e960c7d9ee30c67bbe8e663d9a08b78 Mon Sep 17 00:00:00 2001 From: "zodiac@gmail.com" Date: Thu, 10 Dec 2009 18:44:28 +0000 Subject: [PATCH] Add .note.GNU-stack to all object files so that the generated binary doesn't erroneously request an executable stack. git-svn-id: https://shellinabox.googlecode.com/svn/trunk@200 0da03de8-d603-11dd-86c2-0f8696b7b6f9 --- ChangeLog | 5 +++++ Makefile.am | 30 +++++++++++++++++++++++++++--- Makefile.in | 25 ++++++++++++++++++++++--- config.h | 2 +- configure | 2 +- configure.ac | 2 +- demo/vt100.js | 2 +- shellinabox/shell_in_a_box.js | 2 +- shellinabox/vt100.js | 2 +- 9 files changed, 60 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e437c7..2a519ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-10 Markus Gutschke + + * Add .note.GNU-stack to all object files so that the generated + binary doesn't erroneously request an executable stack. + 2009-12-03 Markus Gutschke * Allow retrieval of the user's default login shell from diff --git a/Makefile.am b/Makefile.am index 3759202..f0ab2f6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -226,31 +226,47 @@ shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h clean-local: -rm -rf shellinaboxd.1 \ - shellinaboxd.ps + shellinaboxd.ps -rm -rf debian/shellinabox \ - debian/shellinabox*.debhelper* \ + debian/shellinabox*.debhelper* \ debian/shellinabox.substvars \ - debian/tmp + debian/tmp + -rm -rf GNU-stack .css.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack .gif.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack + .html.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack + .ico.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack + shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h @@ -267,9 +283,17 @@ shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack + .wav.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack + diff --git a/Makefile.in b/Makefile.in index 7ad48c0..75627b3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1239,31 +1239,44 @@ shellinaboxd.1: shellinabox/shellinaboxd.man.in config.h clean-local: -rm -rf shellinaboxd.1 \ - shellinaboxd.ps + shellinaboxd.ps -rm -rf debian/shellinabox \ - debian/shellinabox*.debhelper* \ + debian/shellinabox*.debhelper* \ debian/shellinabox.substvars \ - debian/tmp + debian/tmp + -rm -rf GNU-stack .css.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack .gif.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack .html.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack .ico.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h @@ -1280,11 +1293,17 @@ shellinabox/shell_in_a_box.o: shellinabox/shell_in_a_box.js config.h @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack .wav.o: @echo objcopy "$<" "$@" @objcopy -I binary `$(objcopyflags)` `echo "$<" | $(renamesymbols)` \ "$<" "$@" + @-printf '\000' >GNU-stack && \ + objcopy --add-section .note.GNU-stack=GNU-stack "$@"; \ + rm -f GNU-stack # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/config.h b/config.h index f893da3..15dd68f 100644 --- a/config.h +++ b/config.h @@ -141,7 +141,7 @@ #define STDC_HEADERS 1 /* Most recent revision number in the version control system */ -#define VCS_REVISION "198" +#define VCS_REVISION "200" /* Version number of package */ #define VERSION "2.10" diff --git a/configure b/configure index d4c15af..1626dd1 100755 --- a/configure +++ b/configure @@ -2325,7 +2325,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -VCS_REVISION=198 +VCS_REVISION=200 cat >>confdefs.h <<_ACEOF diff --git a/configure.ac b/configure.ac index 8dff904..a42b0e5 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ AC_PREREQ(2.57) dnl This is the one location where the authoritative version number is stored AC_INIT(shellinabox, 2.10, markus@shellinabox.com) -VCS_REVISION=198 +VCS_REVISION=200 AC_SUBST(VCS_REVISION) AC_DEFINE_UNQUOTED(VCS_REVISION, "${VCS_REVISION}", [Most recent revision number in the version control system]) diff --git a/demo/vt100.js b/demo/vt100.js index 96bdb46..c46e0c0 100644 --- a/demo/vt100.js +++ b/demo/vt100.js @@ -1955,7 +1955,7 @@ VT100.prototype.toggleBell = function() { }; VT100.prototype.about = function() { - alert("VT100 Terminal Emulator " + "2.10 (revision 198)" + + alert("VT100 Terminal Emulator " + "2.10 (revision 200)" + "\nCopyright 2008-2009 by Markus Gutschke\n" + "For more information check http://shellinabox.com"); }; diff --git a/shellinabox/shell_in_a_box.js b/shellinabox/shell_in_a_box.js index fb8fdcc..c580125 100644 --- a/shellinabox/shell_in_a_box.js +++ b/shellinabox/shell_in_a_box.js @@ -358,7 +358,7 @@ ShellInABox.prototype.extendContextMenu = function(entries, actions) { }; ShellInABox.prototype.about = function() { - alert("Shell In A Box version " + "2.10 (revision 198)" + + alert("Shell In A Box version " + "2.10 (revision 200)" + "\nCopyright 2008-2009 by Markus Gutschke\n" + "For more information check http://shellinabox.com" + (typeof serverSupportsSSL != 'undefined' && serverSupportsSSL ? diff --git a/shellinabox/vt100.js b/shellinabox/vt100.js index 96bdb46..c46e0c0 100644 --- a/shellinabox/vt100.js +++ b/shellinabox/vt100.js @@ -1955,7 +1955,7 @@ VT100.prototype.toggleBell = function() { }; VT100.prototype.about = function() { - alert("VT100 Terminal Emulator " + "2.10 (revision 198)" + + alert("VT100 Terminal Emulator " + "2.10 (revision 200)" + "\nCopyright 2008-2009 by Markus Gutschke\n" + "For more information check http://shellinabox.com"); };