forked from gentoo/pax-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsecurity.h
29 lines (25 loc) · 806 Bytes
/
security.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* Various security related features.
*
* Copyright 2015-2024 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
*
* Copyright 2015-2024 Mike Frysinger - <vapier@gentoo.org>
*/
#ifndef _PAX_SECURITY_H
#define _PAX_SECURITY_H
/* Whether to enable features that significantly impact speed. */
#ifdef SLOW_SECURITY
# define USE_SLOW_SECURITY 1
#else
# define USE_SLOW_SECURITY 0
#endif
#ifdef __linux__
/* Lock down the runtime; allow_forking controls whether to use a pidns. */
void security_init(bool allow_forking);
/* Disable forking; usable only when allow_forking above was true. */
void security_init_pid(void);
#else
static inline void security_init(bool allow_forking) { (void) allow_forking; }
static inline void security_init_pid(void) {}
#endif
#endif