]>
Commit | Line | Data |
---|---|---|
45ed1fc4 | 1 | --- a/libcap/include/sys/capability.h |
2 | +++ b/libcap/include/sys/capability.h | |
3 | @@ -19,24 +19,12 @@ extern "C" { | |
4 | * information for the user library. | |
5 | */ | |
6 | ||
7 | +/* Linux headers are now sanitized properly for userspace */ | |
8 | +#include <linux/capability.h> | |
9 | #include <sys/types.h> | |
10 | #include <stdint.h> | |
11 | ||
12 | /* | |
13 | - * Make sure we can be included from userland by preventing | |
14 | - * capability.h from including other kernel headers | |
15 | - */ | |
16 | -#define _LINUX_TYPES_H | |
17 | -#define _LINUX_FS_H | |
18 | -#define __LINUX_COMPILER_H | |
19 | -#define __user | |
20 | - | |
21 | -typedef unsigned int __u32; | |
22 | -typedef __u32 __le32; | |
23 | - | |
24 | -#include <linux/capability.h> | |
25 | - | |
26 | -/* | |
27 | * POSIX capability types | |
28 | */ | |
29 | ||
30 | --- libcap-2.16/progs/capsh.c~ 2009-05-16 00:52:08.000000000 +0200 | |
31 | +++ libcap-2.16/progs/capsh.c 2009-05-16 00:52:22.876562306 +0200 | |
32 | @@ -13,10 +13,10 @@ | |
33 | #include <string.h> | |
34 | #include <stdlib.h> | |
35 | #include <sys/prctl.h> | |
36 | -#include <sys/capability.h> | |
37 | #include <unistd.h> | |
38 | #include <errno.h> | |
39 | #include <sys/wait.h> | |
40 | +#include <sys/capability.h> | |
41 | ||
42 | /* prctl based API for altering character of current process */ | |
43 | #define PR_GET_KEEPCAPS 7 | |
44 | ||
45 | --- libcap-2.16/libcap/include/linux/capability.h~ 2009-05-16 00:52:08.000000000 +0200 | |
46 | +++ libcap-2.16/libcap/include/linux/capability.h 2009-05-16 00:52:22.876562306 +0200 | |
47 | @@ -40,13 +40,13 @@ struct task_struct; | |
48 | typedef struct __user_cap_header_struct { | |
49 | __u32 version; | |
50 | int pid; | |
51 | -} __user *cap_user_header_t; | |
52 | +} *cap_user_header_t; | |
53 | ||
54 | typedef struct __user_cap_data_struct { | |
55 | __u32 effective; | |
56 | __u32 permitted; | |
57 | __u32 inheritable; | |
58 | -} __user *cap_user_data_t; | |
59 | +} *cap_user_data_t; | |
60 | ||
61 | ||
62 | #define XATTR_CAPS_SUFFIX "capability" |