1 |
commit: c206aab32dce7db944996628f160a3dcbaeb6c6f |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 30 19:40:36 2014 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 30 19:40:36 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=c206aab3 |
7 |
|
8 |
Split misc/ into misc/ for production and poc/ for experimental stuff. |
9 |
|
10 |
--- |
11 |
README | 32 ++++++++++++++++++++++++ |
12 |
{misc => pocs}/change-interp/.gitignore | 0 |
13 |
{misc => pocs}/change-interp/Makefile | 0 |
14 |
{misc => pocs}/change-interp/change-interp.c | 0 |
15 |
{misc => pocs/eclass}/pax-utils.eclass | 8 +++--- |
16 |
{misc => pocs}/elf-manipulate/.gitignore | 0 |
17 |
{misc => pocs}/elf-manipulate/Makefile | 0 |
18 |
{misc => pocs}/elf-manipulate/clear-dt-path.c | 0 |
19 |
{misc => pocs}/elf-manipulate/parse-elf.c | 0 |
20 |
{misc => pocs}/elf-manipulate/print-sections.c | 0 |
21 |
{misc => pocs}/elf-manipulate/remove-ptpax.c | 0 |
22 |
{misc => pocs}/ldd/ldd.py | 0 |
23 |
{misc => pocs}/link-maps/link_map.py | 0 |
24 |
{misc => pocs}/link-maps/link_map_test | 0 |
25 |
{misc => pocs}/mangle-paxflags/.gitignore | 0 |
26 |
{misc => pocs}/mangle-paxflags/Makefile | 0 |
27 |
{misc => pocs}/mangle-paxflags/bad-mmap.c | 0 |
28 |
{misc => pocs}/mangle-paxflags/mangle-paxflags.c | 0 |
29 |
{misc => pocs}/mangle-paxflags/poc.sh | 0 |
30 |
{misc => pocs}/paxmark-libs/Makefile.am | 0 |
31 |
{misc => pocs}/paxmark-libs/autogen.sh | 0 |
32 |
{misc => pocs}/paxmark-libs/configure.ac | 0 |
33 |
{misc => pocs}/paxmark-libs/libmypax.c | 0 |
34 |
{misc => pocs}/paxmark-libs/testdlpax.c | 0 |
35 |
{misc => pocs}/paxmark-libs/testpax.c | 0 |
36 |
{misc => pocs/revdep-pax-ng}/revdep-pax-ng | 0 |
37 |
26 files changed, 36 insertions(+), 4 deletions(-) |
38 |
|
39 |
diff --git a/README b/README |
40 |
index 354a4c7..21ec330 100644 |
41 |
--- a/README |
42 |
+++ b/README |
43 |
@@ -1,3 +1,35 @@ |
44 |
|
45 |
Utilities to modify Elf binaries to work with PaX hardened kernel. |
46 |
+There are several utilities in here, to help you navigate: |
47 |
+ |
48 |
+Directories src/ scripts/ doc/ test/ are integral parts of the elfix package. |
49 |
+These are distributed as one source tarball with `make dist` run in the top |
50 |
+diretory. |
51 |
+ * paxctl-ng - C utility for doing XT_PAX and/or PT_PAX markings. |
52 |
+ * pypaxctl - python utility for doing XT_PAX and/or PT_PAX markings. Depends on pax.so. |
53 |
+ * migrate-pax - python utility for migrating from XT_PAX flags to PT_PAX. Depends on pax.so. |
54 |
+ * revdep-pax - python utility for mapping ELF libraries to/from the ELF objects that link |
55 |
+ against them and migrating PAX flags between them. Depends on pax.so. |
56 |
+ * paxmark.sh - Bash script that does intelligent pax-marking like the pax-utils.eclass. |
57 |
+ * paxmodule.c - C code for python module pax.so |
58 |
+ |
59 |
+Directories under misc/ are independant packages from one another and from the |
60 |
+elfix package. They are NOT distributed with elfix when running `make dist` in |
61 |
+the top directory. Each directory supplies its own build system. |
62 |
+ * install-xattr - C wrapper to coreutils' install which preserves file system extended attributes. |
63 |
+ |
64 |
+Directory pocs/ - Very experimental stuff. |
65 |
+ * change-interp - C utility to the dynamic linker, INTERP as reported by `readelf -l`. |
66 |
+ * eclass - a local copy of the pax-utils.eclass |
67 |
+ * elf-manipulate - some dirty utilities to |
68 |
+ * clear-dt-path.c - remove RPATH and RUNPATH |
69 |
+ * parse-elf.c - print out the ELF header, sections headers and program headers. |
70 |
+ * print-sections.c - print out the contents of the section headers |
71 |
+ * remove-ptpax.c - change a PT_PAX_FLAGS phdr to PT_NULL |
72 |
+ * ldd - python script to reproduce ldd's output using pyelftools |
73 |
+ * link-maps - use VDB information to produce a full linkage map of the system |
74 |
+ * mangle-paxflags - printout old EI_PAX flags and PT_PAX flags |
75 |
+ * paxmark-libs - test how PAX flags migrate from libraries and plugins to their consumers |
76 |
+ * revdep-pax-ng - same as revdep-pax but using information obtained from `ldd` and |
77 |
+ not VDB information. |
78 |
|
79 |
|
80 |
diff --git a/misc/change-interp/.gitignore b/pocs/change-interp/.gitignore |
81 |
similarity index 100% |
82 |
rename from misc/change-interp/.gitignore |
83 |
rename to pocs/change-interp/.gitignore |
84 |
|
85 |
diff --git a/misc/change-interp/Makefile b/pocs/change-interp/Makefile |
86 |
similarity index 100% |
87 |
rename from misc/change-interp/Makefile |
88 |
rename to pocs/change-interp/Makefile |
89 |
|
90 |
diff --git a/misc/change-interp/change-interp.c b/pocs/change-interp/change-interp.c |
91 |
similarity index 100% |
92 |
rename from misc/change-interp/change-interp.c |
93 |
rename to pocs/change-interp/change-interp.c |
94 |
|
95 |
diff --git a/misc/pax-utils.eclass b/pocs/eclass/pax-utils.eclass |
96 |
similarity index 97% |
97 |
rename from misc/pax-utils.eclass |
98 |
rename to pocs/eclass/pax-utils.eclass |
99 |
index 547d6ac..719e15b 100644 |
100 |
--- a/misc/pax-utils.eclass |
101 |
+++ b/pocs/eclass/pax-utils.eclass |
102 |
@@ -1,6 +1,6 @@ |
103 |
-# Copyright 1999-2013 Gentoo Foundation |
104 |
+# Copyright 1999-2014 Gentoo Foundation |
105 |
# Distributed under the terms of the GNU General Public License v2 |
106 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/pax-utils.eclass,v 1.21 2013/05/18 13:43:20 zorry Exp $ |
107 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/pax-utils.eclass,v 1.22 2014/07/11 08:21:58 ulm Exp $ |
108 |
|
109 |
# @ECLASS: pax-utils.eclass |
110 |
# @MAINTAINER: |
111 |
@@ -22,8 +22,8 @@ |
112 |
# to contain either "PT", "XT" or "none". The default is to attempt both |
113 |
# PT_PAX and XATTR_PAX. |
114 |
|
115 |
-if [[ ${___ECLASS_ONCE_PAX_UTILS} != "recur -_+^+_- spank" ]] ; then |
116 |
-___ECLASS_ONCE_PAX_UTILS="recur -_+^+_- spank" |
117 |
+if [[ -z ${_PAX_UTILS_ECLASS} ]]; then |
118 |
+_PAX_UTILS_ECLASS=1 |
119 |
|
120 |
# @ECLASS-VARIABLE: PAX_MARKINGS |
121 |
# @DESCRIPTION: |
122 |
|
123 |
diff --git a/misc/elf-manipulate/.gitignore b/pocs/elf-manipulate/.gitignore |
124 |
similarity index 100% |
125 |
rename from misc/elf-manipulate/.gitignore |
126 |
rename to pocs/elf-manipulate/.gitignore |
127 |
|
128 |
diff --git a/misc/elf-manipulate/Makefile b/pocs/elf-manipulate/Makefile |
129 |
similarity index 100% |
130 |
rename from misc/elf-manipulate/Makefile |
131 |
rename to pocs/elf-manipulate/Makefile |
132 |
|
133 |
diff --git a/misc/elf-manipulate/clear-dt-path.c b/pocs/elf-manipulate/clear-dt-path.c |
134 |
similarity index 100% |
135 |
rename from misc/elf-manipulate/clear-dt-path.c |
136 |
rename to pocs/elf-manipulate/clear-dt-path.c |
137 |
|
138 |
diff --git a/misc/elf-manipulate/parse-elf.c b/pocs/elf-manipulate/parse-elf.c |
139 |
similarity index 100% |
140 |
rename from misc/elf-manipulate/parse-elf.c |
141 |
rename to pocs/elf-manipulate/parse-elf.c |
142 |
|
143 |
diff --git a/misc/elf-manipulate/print-sections.c b/pocs/elf-manipulate/print-sections.c |
144 |
similarity index 100% |
145 |
rename from misc/elf-manipulate/print-sections.c |
146 |
rename to pocs/elf-manipulate/print-sections.c |
147 |
|
148 |
diff --git a/misc/elf-manipulate/remove-ptpax.c b/pocs/elf-manipulate/remove-ptpax.c |
149 |
similarity index 100% |
150 |
rename from misc/elf-manipulate/remove-ptpax.c |
151 |
rename to pocs/elf-manipulate/remove-ptpax.c |
152 |
|
153 |
diff --git a/misc/ldd/ldd.py b/pocs/ldd/ldd.py |
154 |
similarity index 100% |
155 |
rename from misc/ldd/ldd.py |
156 |
rename to pocs/ldd/ldd.py |
157 |
|
158 |
diff --git a/misc/link-maps/link_map.py b/pocs/link-maps/link_map.py |
159 |
similarity index 100% |
160 |
rename from misc/link-maps/link_map.py |
161 |
rename to pocs/link-maps/link_map.py |
162 |
|
163 |
diff --git a/misc/link-maps/link_map_test b/pocs/link-maps/link_map_test |
164 |
similarity index 100% |
165 |
rename from misc/link-maps/link_map_test |
166 |
rename to pocs/link-maps/link_map_test |
167 |
|
168 |
diff --git a/misc/mangle-paxflags/.gitignore b/pocs/mangle-paxflags/.gitignore |
169 |
similarity index 100% |
170 |
rename from misc/mangle-paxflags/.gitignore |
171 |
rename to pocs/mangle-paxflags/.gitignore |
172 |
|
173 |
diff --git a/misc/mangle-paxflags/Makefile b/pocs/mangle-paxflags/Makefile |
174 |
similarity index 100% |
175 |
rename from misc/mangle-paxflags/Makefile |
176 |
rename to pocs/mangle-paxflags/Makefile |
177 |
|
178 |
diff --git a/misc/mangle-paxflags/bad-mmap.c b/pocs/mangle-paxflags/bad-mmap.c |
179 |
similarity index 100% |
180 |
rename from misc/mangle-paxflags/bad-mmap.c |
181 |
rename to pocs/mangle-paxflags/bad-mmap.c |
182 |
|
183 |
diff --git a/misc/mangle-paxflags/mangle-paxflags.c b/pocs/mangle-paxflags/mangle-paxflags.c |
184 |
similarity index 100% |
185 |
rename from misc/mangle-paxflags/mangle-paxflags.c |
186 |
rename to pocs/mangle-paxflags/mangle-paxflags.c |
187 |
|
188 |
diff --git a/misc/mangle-paxflags/poc.sh b/pocs/mangle-paxflags/poc.sh |
189 |
similarity index 100% |
190 |
rename from misc/mangle-paxflags/poc.sh |
191 |
rename to pocs/mangle-paxflags/poc.sh |
192 |
|
193 |
diff --git a/misc/paxmark-libs/Makefile.am b/pocs/paxmark-libs/Makefile.am |
194 |
similarity index 100% |
195 |
rename from misc/paxmark-libs/Makefile.am |
196 |
rename to pocs/paxmark-libs/Makefile.am |
197 |
|
198 |
diff --git a/misc/paxmark-libs/autogen.sh b/pocs/paxmark-libs/autogen.sh |
199 |
similarity index 100% |
200 |
rename from misc/paxmark-libs/autogen.sh |
201 |
rename to pocs/paxmark-libs/autogen.sh |
202 |
|
203 |
diff --git a/misc/paxmark-libs/configure.ac b/pocs/paxmark-libs/configure.ac |
204 |
similarity index 100% |
205 |
rename from misc/paxmark-libs/configure.ac |
206 |
rename to pocs/paxmark-libs/configure.ac |
207 |
|
208 |
diff --git a/misc/paxmark-libs/libmypax.c b/pocs/paxmark-libs/libmypax.c |
209 |
similarity index 100% |
210 |
rename from misc/paxmark-libs/libmypax.c |
211 |
rename to pocs/paxmark-libs/libmypax.c |
212 |
|
213 |
diff --git a/misc/paxmark-libs/testdlpax.c b/pocs/paxmark-libs/testdlpax.c |
214 |
similarity index 100% |
215 |
rename from misc/paxmark-libs/testdlpax.c |
216 |
rename to pocs/paxmark-libs/testdlpax.c |
217 |
|
218 |
diff --git a/misc/paxmark-libs/testpax.c b/pocs/paxmark-libs/testpax.c |
219 |
similarity index 100% |
220 |
rename from misc/paxmark-libs/testpax.c |
221 |
rename to pocs/paxmark-libs/testpax.c |
222 |
|
223 |
diff --git a/misc/revdep-pax-ng b/pocs/revdep-pax-ng/revdep-pax-ng |
224 |
similarity index 100% |
225 |
rename from misc/revdep-pax-ng |
226 |
rename to pocs/revdep-pax-ng/revdep-pax-ng |