1 /* Copyright 2016 The Chromium OS Authors. All rights reserved. 2 * Use of this source code is governed by a BSD-style license that can be 3 * found in the LICENSE file. 4 */ 5 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 38 int sys_seccomp(unsigned int operation, unsigned int flags, void *args); 39 40 #ifdef __cplusplus 41 }; /* extern "C" */ 42 #endif 43 44 #endif /* _SYSCALL_WRAPPER_H_ */ 45