1*4b9c6d91SCole Faust /* Copyright 2016 The ChromiumOS Authors 2*4b9c6d91SCole Faust * Use of this source code is governed by a BSD-style license that can be 3*4b9c6d91SCole Faust * found in the LICENSE file. 4*4b9c6d91SCole Faust */ 5*4b9c6d91SCole Faust 6*4b9c6d91SCole Faust #ifndef _SYSCALL_WRAPPER_H_ 7*4b9c6d91SCole Faust #define _SYSCALL_WRAPPER_H_ 8*4b9c6d91SCole Faust 9*4b9c6d91SCole Faust #ifdef __cplusplus 10*4b9c6d91SCole Faust extern "C" { 11*4b9c6d91SCole Faust #endif 12*4b9c6d91SCole Faust 13*4b9c6d91SCole Faust /* Seccomp filter related flags. */ 14*4b9c6d91SCole Faust #ifndef PR_SET_NO_NEW_PRIVS 15*4b9c6d91SCole Faust # define PR_SET_NO_NEW_PRIVS 38 16*4b9c6d91SCole Faust #endif 17*4b9c6d91SCole Faust 18*4b9c6d91SCole Faust #ifndef SECCOMP_MODE_FILTER 19*4b9c6d91SCole Faust #define SECCOMP_MODE_FILTER 2 /* Uses user-supplied filter. */ 20*4b9c6d91SCole Faust #endif 21*4b9c6d91SCole Faust 22*4b9c6d91SCole Faust #ifndef SECCOMP_SET_MODE_STRICT 23*4b9c6d91SCole Faust # define SECCOMP_SET_MODE_STRICT 0 24*4b9c6d91SCole Faust #endif 25*4b9c6d91SCole Faust #ifndef SECCOMP_SET_MODE_FILTER 26*4b9c6d91SCole Faust # define SECCOMP_SET_MODE_FILTER 1 27*4b9c6d91SCole Faust #endif 28*4b9c6d91SCole Faust 29*4b9c6d91SCole Faust #ifndef SECCOMP_FILTER_FLAG_TSYNC 30*4b9c6d91SCole Faust # define SECCOMP_FILTER_FLAG_TSYNC 1 31*4b9c6d91SCole Faust #endif 32*4b9c6d91SCole Faust 33*4b9c6d91SCole Faust #ifndef SECCOMP_FILTER_FLAG_SPEC_ALLOW 34*4b9c6d91SCole Faust # define SECCOMP_FILTER_FLAG_SPEC_ALLOW (1 << 2) 35*4b9c6d91SCole Faust #endif 36*4b9c6d91SCole Faust /* End seccomp filter related flags. */ 37*4b9c6d91SCole Faust 38*4b9c6d91SCole Faust int sys_seccomp(unsigned int operation, unsigned int flags, void *args); 39*4b9c6d91SCole Faust 40*4b9c6d91SCole Faust #ifdef __cplusplus 41*4b9c6d91SCole Faust }; /* extern "C" */ 42*4b9c6d91SCole Faust #endif 43*4b9c6d91SCole Faust 44*4b9c6d91SCole Faust #endif /* _SYSCALL_WRAPPER_H_ */ 45