diff options
-rw-r--r-- | dumpelf.c | 13 | ||||
-rw-r--r-- | paxelf.c | 13 | ||||
-rw-r--r-- | paxelf.h | 2 | ||||
-rw-r--r-- | paxinc.c | 7 | ||||
-rw-r--r-- | paxinc.h | 10 | ||||
-rw-r--r-- | paxldso.c | 17 | ||||
-rw-r--r-- | paxldso.h | 2 | ||||
-rw-r--r-- | paxmacho.c | 12 | ||||
-rw-r--r-- | paxmacho.h | 2 | ||||
-rw-r--r-- | pspax.c | 21 | ||||
-rw-r--r-- | scanelf.c | 22 | ||||
-rw-r--r-- | scanmacho.c | 19 | ||||
-rw-r--r-- | security.c | 13 | ||||
-rw-r--r-- | xfuncs.c | 6 |
14 files changed, 157 insertions, 2 deletions
@@ -8,7 +8,20 @@ const char argv0[] = "dumpelf"; +#include <getopt.h> +#include <inttypes.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include <unistd.h> + #include "paxinc.h" +#include "elf.h" +#include "pax_utils_version.h" +#include "porting.h" +#include "security.h" /* prototypes */ static void dump_ehdr(const elfobj *elf, const void *ehdr); @@ -6,7 +6,20 @@ * Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org> */ +#include <fcntl.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <unistd.h> + #include "paxinc.h" +#include "elf.h" +#include "paxelf.h" +#include "porting.h" +#include "xfuncs.h" /* * Setup a bunch of helper functions to translate @@ -16,6 +16,8 @@ #include <stdio.h> #include <sys/types.h> +#include "elf.h" + typedef struct { const void *phdr; const void *shdr; @@ -11,6 +11,13 @@ #define IN_paxinc #include "paxinc.h" +#include <alloca.h> +#include <fcntl.h> +#include <sys/stat.h> +#include <unistd.h> + +#include "xfuncs.h" + char do_reverse_endian; /* some of this ar code was taken from busybox */ @@ -11,6 +11,15 @@ #ifndef _PAX_INC_H #define _PAX_INC_H +#include <byteswap.h> +#include <errno.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/types.h> +#include <stdint.h> + #include "porting.h" #include "xfuncs.h" #include "security.h" @@ -35,7 +44,6 @@ #include "elf.h" #include "paxelf.h" #include "paxldso.h" - /* Mach-O love */ #include "macho.h" #include "paxmacho.h" @@ -6,7 +6,24 @@ * Copyright 2004-2016 Mike Frysinger - <vapier@gentoo.org> */ +#include <ctype.h> +#include <fcntl.h> +#include <features.h> +#include <glob.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <unistd.h> + #include "paxinc.h" +#include "elf.h" +#include "paxelf.h" +#include "paxldso.h" +#include "xfuncs.h" /* * ld.so.cache logic @@ -9,6 +9,8 @@ #ifndef _PAX_LDSO_H #define _PAX_LDSO_H +#include <features.h> + #include "paxelf.h" #include "porting.h" #include "xfuncs.h" @@ -7,7 +7,19 @@ * 2008-2021 Fabian Groffen - <grobian@gentoo.org> */ +#include <byteswap.h> +#include <fcntl.h> +#include <stdint.h> +#include <stdlib.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <unistd.h> + #include "paxinc.h" +#include "macho.h" +#include "paxmacho.h" +#include "xfuncs.h" /* lil' static string pool */ static const char STR_BE[] = "BE"; @@ -13,6 +13,8 @@ #define _PAX_MACHO_H #include <stddef.h> +#include <byteswap.h> +#include <stdint.h> #include "macho.h" @@ -14,12 +14,31 @@ const char argv0[] = "pspax"; -#include "paxinc.h" #include <grp.h> +#include <ctype.h> +#include <dirent.h> +#include <fcntl.h> +#include <getopt.h> +#include <pwd.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <strings.h> +#include <sys/stat.h> +#include <unistd.h> + +#include "paxinc.h" +#include "elf.h" +#include "pax_utils_version.h" +#include "paxelf.h" +#include "security.h" #ifdef WANT_SYSCAP # undef _POSIX_SOURCE # include <sys/capability.h> + # define WRAP_SYSCAP(x) x #else # define WRAP_SYSCAP(x) @@ -8,7 +8,29 @@ const char argv0[] = "scanelf"; +#include <ctype.h> +#include <dirent.h> +#include <errno.h> +#include <fcntl.h> +#include <fnmatch.h> +#include <getopt.h> +#include <inttypes.h> +#include <regex.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <unistd.h> + #include "paxinc.h" +#include "elf.h" +#include "pax_utils_version.h" +#include "paxldso.h" +#include "porting.h" +#include "security.h" +#include "xfuncs.h" #define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') diff --git a/scanmacho.c b/scanmacho.c index e2aa485..fa1eee1 100644 --- a/scanmacho.c +++ b/scanmacho.c @@ -11,7 +11,26 @@ const char argv0[] = "scanmacho"; +#include <dirent.h> +#include <errno.h> +#include <fcntl.h> +#include <getopt.h> +#include <stdbool.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/mman.h> +#include <sys/stat.h> +#include <unistd.h> + #include "paxinc.h" +#include "macho.h" +#include "pax_utils_version.h" +#include "paxmacho.h" +#include "porting.h" +#include "security.h" +#include "xfuncs.h" #define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') @@ -5,8 +5,21 @@ * Copyright 2015 Mike Frysinger - <vapier@gentoo.org> */ +#include <errno.h> + +#ifdef WANT_SECCOMP +#include <linux/seccomp.h> +#include <linux/securebits.h> +#endif + +#include <sched.h> +#include <stdbool.h> +#include <sys/prctl.h> +#include <unistd.h> + #include "paxinc.h" #include "seccomp-bpf.h" +#include "security.h" #ifdef __linux__ @@ -6,7 +6,13 @@ * Copyright 2004-2012 Mike Frysinger - <vapier@gentoo.org> */ +#include <errno.h> +#include <stdbool.h> +#include <stdlib.h> +#include <string.h> + #include "paxinc.h" +#include "xfuncs.h" char *xstrdup(const char *s) { |