blob: 77691086d28750876372153c5bc82621c68b9ebf [file] [log] [blame]
Mike Frysinger50e31fa2018-01-19 18:59:49 -05001/* 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.
Jorge Lucangeli Obes13650612016-09-02 11:27:29 -04004 */
5
Luis Héctor Chávez01b628c2021-01-03 05:46:57 -08006#ifndef _SYSCALL_WRAPPER_H_
7#define _SYSCALL_WRAPPER_H_
8
9#ifdef __cplusplus
10extern "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 Obes13650612016-09-02 11:27:29 -040038int sys_seccomp(unsigned int operation, unsigned int flags, void *args);
Luis Héctor Chávez01b628c2021-01-03 05:46:57 -080039
40#ifdef __cplusplus
41}; /* extern "C" */
42#endif
43
44#endif /* _SYSCALL_WRAPPER_H_ */