From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RGEuI-0006GV-UV for garchives@archives.gentoo.org; Tue, 18 Oct 2011 19:00:59 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8C1E921C0A8; Tue, 18 Oct 2011 19:00:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 45C2C21C0A8 for ; Tue, 18 Oct 2011 19:00:49 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B27FF1B4009 for ; Tue, 18 Oct 2011 19:00:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 27B3080042 for ; Tue, 18 Oct 2011 19:00:48 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: Subject: [gentoo-commits] proj/elfix:master commit in: misc/mangle-paxflags/, /, poc/ X-VCS-Repository: proj/elfix X-VCS-Files: Makefile.am configure.ac misc/mangle-paxflags/Makefile misc/mangle-paxflags/bad-mmap.c misc/mangle-paxflags/mangle-paxflags.c misc/mangle-paxflags/poc.sh poc/Makefile.am poc/bad-mmap.c poc/mangle-paxflags.c X-VCS-Directories: misc/mangle-paxflags/ / poc/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: ddc5a054fee4cb25a9ae0c075d7ee9d66aebbbd4 Date: Tue, 18 Oct 2011 19:00:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: f8b5e265e63f43d22bd9827a36966da8 commit: ddc5a054fee4cb25a9ae0c075d7ee9d66aebbbd4 Author: Anthony G. Basile gentoo org> AuthorDate: Tue Oct 18 19:00:40 2011 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Tue Oct 18 19:00:40 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/elfix.git;a=3D= commit;h=3Dddc5a054 Remove poc to misc code directory --- Makefile.am | 5 +--- configure.ac | 9 -------- misc/mangle-paxflags/Makefile | 7 ++++++ {poc =3D> misc/mangle-paxflags}/bad-mmap.c | 0 {poc =3D> misc/mangle-paxflags}/mangle-paxflags.c | 6 +---- misc/mangle-paxflags/poc.sh | 20 +++++++++++++++++ poc/Makefile.am | 26 -----------------= ------ 7 files changed, 29 insertions(+), 44 deletions(-) diff --git a/Makefile.am b/Makefile.am index f092f0d..3774f5b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,4 @@ if TEST SUBDIRS_TESTS =3D tests endif -if POC -SUBDIRS_POC =3D poc -endif -SUBDIRS =3D src scripts doc $(SUBDIRS_TESTS) $(SUBDIRS_POC) +SUBDIRS =3D src scripts doc $(SUBDIRS_TESTS) diff --git a/configure.ac b/configure.ac index b9731b0..c7a26a4 100644 --- a/configure.ac +++ b/configure.ac @@ -25,15 +25,6 @@ AC_ARG_ENABLE( ) AM_CONDITIONAL([TEST],[test "x$has_yasm" =3D "xyes"]) =20 -AC_ARG_ENABLE( - [poc], - AS_HELP_STRING( - [--enable-poc], - [build proof of concept code] - ) -) -AM_CONDITIONAL([POC],[test "x$enable_poc" =3D "xyes"]) - # Checks for programs. AC_PROG_CC AC_CHECK_FUNCS([strerror]) diff --git a/misc/mangle-paxflags/Makefile b/misc/mangle-paxflags/Makefil= e new file mode 100644 index 0000000..9c2789d --- /dev/null +++ b/misc/mangle-paxflags/Makefile @@ -0,0 +1,7 @@ +all: bad-mmap mangle-paxflags + +%: %.c + gcc -o $@ $^ -lelf + +clean: + rm -rf bad-mmap mangle-paxflags diff --git a/poc/bad-mmap.c b/misc/mangle-paxflags/bad-mmap.c similarity index 100% rename from poc/bad-mmap.c rename to misc/mangle-paxflags/bad-mmap.c diff --git a/poc/mangle-paxflags.c b/misc/mangle-paxflags/mangle-paxflags= .c similarity index 97% rename from poc/mangle-paxflags.c rename to misc/mangle-paxflags/mangle-paxflags.c index 402fb67..5e41cd1 100644 --- a/poc/mangle-paxflags.c +++ b/misc/mangle-paxflags/mangle-paxflags.c @@ -30,8 +30,6 @@ #include =20 =20 -#include - // From chpax.h #define EI_PAX 14 // Index in e_ident[] where to read flags #define HF_PAX_PAGEEXEC 1 // 0: Paging based non-exec pages @@ -51,11 +49,9 @@ void print_help(char *v) { printf( - "Package Name : " PACKAGE_STRING "\n" - "Bug Reports : " PACKAGE_BUGREPORT "\n" "Program Name : %s\n" "Description : Check for, or conditionally remove, executable flag fr= om PT_GNU_STACK\n\n" - "Usage : %s {[-e] [-p] [-v] [-q] ELFfile | [-h]}\n" + "Usage : %s [-e] [-p] [-v] [-q] ELFfile | [-h]\n" "options : Print out EI_PAX and PT_PAX_FLAGS information\n" " : -e Set all EI_PAX flags to least secure setting, pEmr= Xs\n" " : -p Remove PT_PAX_FLAGS program header\n" diff --git a/misc/mangle-paxflags/poc.sh b/misc/mangle-paxflags/poc.sh new file mode 100755 index 0000000..f268f33 --- /dev/null +++ b/misc/mangle-paxflags/poc.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D" +echo +./mangle-paxflags bad-mmap +./bad-mmap +echo +echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" +echo +./mangle-paxflags -p bad-mmap +./mangle-paxflags bad-mmap +./bad-mmap +echo +echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" +echo +./mangle-paxflags -e bad-mmap +./mangle-paxflags bad-mmap +./bad-mmap +echo +echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D" diff --git a/poc/Makefile.am b/poc/Makefile.am deleted file mode 100644 index 016f822..0000000 --- a/poc/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -noinst_PROGRAMS =3D bad-mmap mangle-paxflags -bad_mmap_SOURCES =3D bad-mmap.c -mangle_paxflags_SOURCES =3D mangle-paxflags.c -mangle_paxflags_LDADD =3D -lelf - -check_SCRIPTS =3D poc.sh - -poc.sh: - @echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D" - @echo - ./mangle-paxflags bad-mmap - ./bad-mmap - @echo - @echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" - @echo - ./mangle-paxflags -p bad-mmap - ./mangle-paxflags bad-mmap - ./bad-mmap - @echo - @echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" - @echo - ./mangle-paxflags -e bad-mmap - ./mangle-paxflags bad-mmap - ./bad-mmap - @echo - @echo "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D"