diff options
| author | Will Drewry <wad@chromium.org> | 2012-04-12 17:47:54 -0400 |
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2012-04-13 21:13:19 -0400 |
| commit | 932ecebb0405b9a41cd18946e6cff8a17d434e23 (patch) | |
| tree | dc40e09ad9bd9964c93023c329d91296009d7e33 /include | |
| parent | 0c5fe1b4221c6701224c2601cf3c692e5721103e (diff) | |
seccomp: kill the seccomp_t typedef
Replaces the seccomp_t typedef with struct seccomp to match modern
kernel style.
Signed-off-by: Will Drewry <wad@chromium.org>
Reviewed-by: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Acked-by: Eric Paris <eparis@redhat.com>
v18: rebase
...
v14: rebase/nochanges
v13: rebase on to 88ebdda6159ffc15699f204c33feb3e431bf9bdc
v12: rebase on to linux-next
v8-v11: no changes
v7: struct seccomp_struct -> struct seccomp
v6: original inclusion in this series.
Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/sched.h | 2 | ||||
| -rw-r--r-- | include/linux/seccomp.h | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index ba60897bb44..cad15023f45 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -1452,7 +1452,7 @@ struct task_struct { | |||
| 1452 | uid_t loginuid; | 1452 | uid_t loginuid; |
| 1453 | unsigned int sessionid; | 1453 | unsigned int sessionid; |
| 1454 | #endif | 1454 | #endif |
| 1455 | seccomp_t seccomp; | 1455 | struct seccomp seccomp; |
| 1456 | 1456 | ||
| 1457 | /* Thread group tracking */ | 1457 | /* Thread group tracking */ |
| 1458 | u32 parent_exec_id; | 1458 | u32 parent_exec_id; |
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h index cc7a4e9cc7a..d61f27fcaa9 100644 --- a/include/linux/seccomp.h +++ b/include/linux/seccomp.h | |||
| @@ -7,7 +7,9 @@ | |||
| 7 | #include <linux/thread_info.h> | 7 | #include <linux/thread_info.h> |
| 8 | #include <asm/seccomp.h> | 8 | #include <asm/seccomp.h> |
| 9 | 9 | ||
| 10 | typedef struct { int mode; } seccomp_t; | 10 | struct seccomp { |
| 11 | int mode; | ||
| 12 | }; | ||
| 11 | 13 | ||
| 12 | extern void __secure_computing(int); | 14 | extern void __secure_computing(int); |
| 13 | static inline void secure_computing(int this_syscall) | 15 | static inline void secure_computing(int this_syscall) |
| @@ -19,7 +21,7 @@ static inline void secure_computing(int this_syscall) | |||
| 19 | extern long prctl_get_seccomp(void); | 21 | extern long prctl_get_seccomp(void); |
| 20 | extern long prctl_set_seccomp(unsigned long); | 22 | extern long prctl_set_seccomp(unsigned long); |
| 21 | 23 | ||
| 22 | static inline int seccomp_mode(seccomp_t *s) | 24 | static inline int seccomp_mode(struct seccomp *s) |
| 23 | { | 25 | { |
| 24 | return s->mode; | 26 | return s->mode; |
| 25 | } | 27 | } |
| @@ -28,7 +30,7 @@ static inline int seccomp_mode(seccomp_t *s) | |||
| 28 | 30 | ||
| 29 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
| 30 | 32 | ||
| 31 | typedef struct { } seccomp_t; | 33 | struct seccomp { }; |
| 32 | 34 | ||
| 33 | #define secure_computing(x) do { } while (0) | 35 | #define secure_computing(x) do { } while (0) |
| 34 | 36 | ||
| @@ -42,7 +44,7 @@ static inline long prctl_set_seccomp(unsigned long arg2) | |||
| 42 | return -EINVAL; | 44 | return -EINVAL; |
| 43 | } | 45 | } |
| 44 | 46 | ||
| 45 | static inline int seccomp_mode(seccomp_t *s) | 47 | static inline int seccomp_mode(struct seccomp *s) |
| 46 | { | 48 | { |
| 47 | return 0; | 49 | return 0; |
| 48 | } | 50 | } |
