Mike Frysinger | 4c33189 | 2022-09-13 05:17:08 -0400 | [diff] [blame] | 1 | /* Copyright 2016 The ChromiumOS Authors |
Mike Frysinger | 50e31fa | 2018-01-19 18:59:49 -0500 | [diff] [blame] | 2 | * Use of this source code is governed by a BSD-style license that can be |
| 3 | * found in the LICENSE file. |
Jorge Lucangeli Obes | 1365061 | 2016-09-02 11:27:29 -0400 | [diff] [blame] | 4 | */ |
| 5 | |
Luis Héctor Chávez | 01b628c | 2021-01-03 05:46:57 -0800 | [diff] [blame] | 6 | #ifndef _SYSCALL_WRAPPER_H_ |
| 7 | #define _SYSCALL_WRAPPER_H_ |
| 8 | |
| 9 | #ifdef __cplusplus |
| 10 | extern "C" { |
| 11 | #endif |
| 12 | |
| 13 | /* Seccomp filter related flags. */ |
| 14 | #ifndef PR_SET_NO_NEW_PRIVS |
| 15 | # define PR_SET_NO_NEW_PRIVS 38 |
| 16 | #endif |
| 17 | |
| 18 | #ifndef SECCOMP_MODE_FILTER |
| 19 | #define SECCOMP_MODE_FILTER 2 /* Uses user-supplied filter. */ |
| 20 | #endif |
| 21 | |
| 22 | #ifndef SECCOMP_SET_MODE_STRICT |
| 23 | # define SECCOMP_SET_MODE_STRICT 0 |
| 24 | #endif |
| 25 | #ifndef SECCOMP_SET_MODE_FILTER |
| 26 | # define SECCOMP_SET_MODE_FILTER 1 |
| 27 | #endif |
| 28 | |
| 29 | #ifndef SECCOMP_FILTER_FLAG_TSYNC |
| 30 | # define SECCOMP_FILTER_FLAG_TSYNC 1 |
| 31 | #endif |
| 32 | |
| 33 | #ifndef SECCOMP_FILTER_FLAG_SPEC_ALLOW |
| 34 | # define SECCOMP_FILTER_FLAG_SPEC_ALLOW (1 << 2) |
| 35 | #endif |
| 36 | /* End seccomp filter related flags. */ |
| 37 | |
Jorge Lucangeli Obes | 1365061 | 2016-09-02 11:27:29 -0400 | [diff] [blame] | 38 | int sys_seccomp(unsigned int operation, unsigned int flags, void *args); |
Luis Héctor Chávez | 01b628c | 2021-01-03 05:46:57 -0800 | [diff] [blame] | 39 | |
| 40 | #ifdef __cplusplus |
| 41 | }; /* extern "C" */ |
| 42 | #endif |
| 43 | |
| 44 | #endif /* _SYSCALL_WRAPPER_H_ */ |