* [gentoo-commits] proj/elfix:master commit in: misc/mangle-paxflags/, /, poc/
@ 2011-10-18 19:00 Anthony G. Basile
0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2011-10-18 19:00 UTC (permalink / raw
To: gentoo-commits
commit: ddc5a054fee4cb25a9ae0c075d7ee9d66aebbbd4
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 18 19:00:40 2011 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Oct 18 19:00:40 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=ddc5a054
Remove poc to misc code directory
---
Makefile.am | 5 +---
configure.ac | 9 --------
misc/mangle-paxflags/Makefile | 7 ++++++
{poc => misc/mangle-paxflags}/bad-mmap.c | 0
{poc => 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 = tests
endif
-if POC
-SUBDIRS_POC = poc
-endif
-SUBDIRS = src scripts doc $(SUBDIRS_TESTS) $(SUBDIRS_POC)
+SUBDIRS = 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" = "xyes"])
-AC_ARG_ENABLE(
- [poc],
- AS_HELP_STRING(
- [--enable-poc],
- [build proof of concept code]
- )
-)
-AM_CONDITIONAL([POC],[test "x$enable_poc" = "xyes"])
-
# Checks for programs.
AC_PROG_CC
AC_CHECK_FUNCS([strerror])
diff --git a/misc/mangle-paxflags/Makefile b/misc/mangle-paxflags/Makefile
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 <unistd.h>
-#include <config.h>
-
// 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 from 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, pEmrXs\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 "================================================================================"
+echo
+./mangle-paxflags bad-mmap
+./bad-mmap
+echo
+echo "========================================"
+echo
+./mangle-paxflags -p bad-mmap
+./mangle-paxflags bad-mmap
+./bad-mmap
+echo
+echo "========================================"
+echo
+./mangle-paxflags -e bad-mmap
+./mangle-paxflags bad-mmap
+./bad-mmap
+echo
+echo "================================================================================"
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 = bad-mmap mangle-paxflags
-bad_mmap_SOURCES = bad-mmap.c
-mangle_paxflags_SOURCES = mangle-paxflags.c
-mangle_paxflags_LDADD = -lelf
-
-check_SCRIPTS = poc.sh
-
-poc.sh:
- @echo "================================================================================"
- @echo
- ./mangle-paxflags bad-mmap
- ./bad-mmap
- @echo
- @echo "========================================"
- @echo
- ./mangle-paxflags -p bad-mmap
- ./mangle-paxflags bad-mmap
- ./bad-mmap
- @echo
- @echo "========================================"
- @echo
- ./mangle-paxflags -e bad-mmap
- ./mangle-paxflags bad-mmap
- ./bad-mmap
- @echo
- @echo "================================================================================"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/elfix:master commit in: misc/mangle-paxflags/, /, poc/
@ 2011-10-18 21:38 Anthony G. Basile
0 siblings, 0 replies; 2+ messages in thread
From: Anthony G. Basile @ 2011-10-18 21:38 UTC (permalink / raw
To: gentoo-commits
commit: 3a24035d8d62797d5bc2a823717c72555024dff4
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 18 19:00:40 2011 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Tue Oct 18 21:38:00 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=3a24035d
Remove poc to misc code directory
---
Makefile.am | 5 +---
configure.ac | 10 --------
misc/mangle-paxflags/Makefile | 7 ++++++
{poc => misc/mangle-paxflags}/bad-mmap.c | 0
{poc => misc/mangle-paxflags}/mangle-paxflags.c | 6 +----
misc/mangle-paxflags/poc.sh | 20 +++++++++++++++++
poc/Makefile.am | 26 -----------------------
7 files changed, 29 insertions(+), 45 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 = tests
endif
-if POC
-SUBDIRS_POC = poc
-endif
-SUBDIRS = src scripts doc $(SUBDIRS_TESTS) $(SUBDIRS_POC)
+SUBDIRS = src scripts doc $(SUBDIRS_TESTS)
diff --git a/configure.ac b/configure.ac
index b9731b0..fa669ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,15 +25,6 @@ AC_ARG_ENABLE(
)
AM_CONDITIONAL([TEST],[test "x$has_yasm" = "xyes"])
-AC_ARG_ENABLE(
- [poc],
- AS_HELP_STRING(
- [--enable-poc],
- [build proof of concept code]
- )
-)
-AM_CONDITIONAL([POC],[test "x$enable_poc" = "xyes"])
-
# Checks for programs.
AC_PROG_CC
AC_CHECK_FUNCS([strerror])
@@ -66,7 +57,6 @@ AC_CONFIG_FILES([Makefile
src/Makefile
scripts/Makefile
doc/Makefile
- poc/Makefile
tests/Makefile])
AC_OUTPUT
diff --git a/misc/mangle-paxflags/Makefile b/misc/mangle-paxflags/Makefile
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 <unistd.h>
-#include <config.h>
-
// 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 from 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, pEmrXs\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 "================================================================================"
+echo
+./mangle-paxflags bad-mmap
+./bad-mmap
+echo
+echo "========================================"
+echo
+./mangle-paxflags -p bad-mmap
+./mangle-paxflags bad-mmap
+./bad-mmap
+echo
+echo "========================================"
+echo
+./mangle-paxflags -e bad-mmap
+./mangle-paxflags bad-mmap
+./bad-mmap
+echo
+echo "================================================================================"
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 = bad-mmap mangle-paxflags
-bad_mmap_SOURCES = bad-mmap.c
-mangle_paxflags_SOURCES = mangle-paxflags.c
-mangle_paxflags_LDADD = -lelf
-
-check_SCRIPTS = poc.sh
-
-poc.sh:
- @echo "================================================================================"
- @echo
- ./mangle-paxflags bad-mmap
- ./bad-mmap
- @echo
- @echo "========================================"
- @echo
- ./mangle-paxflags -p bad-mmap
- ./mangle-paxflags bad-mmap
- ./bad-mmap
- @echo
- @echo "========================================"
- @echo
- ./mangle-paxflags -e bad-mmap
- ./mangle-paxflags bad-mmap
- ./bad-mmap
- @echo
- @echo "================================================================================"
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-18 21:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-18 19:00 [gentoo-commits] proj/elfix:master commit in: misc/mangle-paxflags/, /, poc/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2011-10-18 21:38 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox