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 1R1oRg-00079R-EW for garchives@archives.gentoo.org; Thu, 08 Sep 2011 23:55:48 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5EE8921C113; Thu, 8 Sep 2011 23:55:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2C81F21C03B for ; Thu, 8 Sep 2011 23:55:06 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 88DB51B4020 for ; Thu, 8 Sep 2011 23:55:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 7F83D8004A for ; Thu, 8 Sep 2011 23:55:04 +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:paxmark-libs commit in: / X-VCS-Repository: proj/elfix X-VCS-Files: Makefile.am libmypax.c X-VCS-Directories: / X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: c9b12b8bcabf75911066b9a14782de1befc784cc Date: Thu, 8 Sep 2011 23:55:04 +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: 2a89a7ffa6e789ac371bcd1cc8076d74 commit: c9b12b8bcabf75911066b9a14782de1befc784cc Author: Anthony G. Basile gentoo org> AuthorDate: Mon Sep 5 20:47:36 2011 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Mon Sep 5 20:47:36 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/elfix.git;a=3D= commit;h=3Dc9b12b8b 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 =3D -lmypax =20 lib_LTLIBRARIES =3D libmypax.la libmypax_la_SOURCES =3D libmypax.c + +check_SCRIPTS =3D poc.sh + +poc.sh: + @/sbin/ldconfig + @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 + @/sbin/paxctl -M $(libdir)/libmypax.so + @/sbin/paxctl -v $(libdir)/libmypax.so 2>/dev/null + @echo + $(bindir)/testpax + @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 + @/sbin/paxctl -m $(libdir)/libmypax.so + @/sbin/paxctl -v $(libdir)/libmypax.so 2>/dev/null + @echo + $(bindir)/testpax + @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/libmypax.c b/libmypax.c index 5e1e7e7..5b1068c 100644 --- a/libmypax.c +++ b/libmypax.c @@ -1,6 +1,14 @@ #include +#include +#include +#include +#include =20 void doit() { printf("Doing it\n"); + size_t m =3D mmap( NULL, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MA= P_ANONYMOUS, -1, 0 ); + if( m =3D=3D MAP_FAILED ) + printf("%s\n", strerror(errno)); + printf("Done it\n"); }