From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/elfix:paxmark-libs commit in: /
Date: Thu, 8 Sep 2011 23:55:04 +0000 (UTC) [thread overview]
Message-ID: <c9b12b8bcabf75911066b9a14782de1befc784cc.blueness@gentoo> (raw)
commit: c9b12b8bcabf75911066b9a14782de1befc784cc
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 5 20:47:36 2011 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Sep 5 20:47:36 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=c9b12b8b
Added mmap and paxtest
---
Makefile.am | 21 +++++++++++++++++++++
libmypax.c | 8 ++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index aab8c00..70e4cd3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,3 +6,24 @@ testpax_LDFLAGS = -lmypax
lib_LTLIBRARIES = libmypax.la
libmypax_la_SOURCES = libmypax.c
+
+check_SCRIPTS = poc.sh
+
+poc.sh:
+ @/sbin/ldconfig
+ @echo "================================================================================"
+ @echo
+ @/sbin/paxctl -M $(libdir)/libmypax.so
+ @/sbin/paxctl -v $(libdir)/libmypax.so 2>/dev/null
+ @echo
+ $(bindir)/testpax
+ @echo
+ @echo "========================================"
+ @echo
+ @/sbin/paxctl -m $(libdir)/libmypax.so
+ @/sbin/paxctl -v $(libdir)/libmypax.so 2>/dev/null
+ @echo
+ $(bindir)/testpax
+ @echo
+ @echo "================================================================================"
+
diff --git a/libmypax.c b/libmypax.c
index 5e1e7e7..5b1068c 100644
--- a/libmypax.c
+++ b/libmypax.c
@@ -1,6 +1,14 @@
#include <stdio.h>
+#include <stdlib.h>
+#include <sys/mman.h>
+#include <errno.h>
+#include <string.h>
void
doit() {
printf("Doing it\n");
+ size_t m = mmap( NULL, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0 );
+ if( m == MAP_FAILED )
+ printf("%s\n", strerror(errno));
+ printf("Done it\n");
}
next reply other threads:[~2011-09-08 23:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 23:55 Anthony G. Basile [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-09-08 23:55 [gentoo-commits] proj/elfix:paxmark-libs commit in: / Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
2011-09-08 23:55 Anthony G. Basile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9b12b8bcabf75911066b9a14782de1befc784cc.blueness@gentoo \
--to=blueness@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox