File: security.h

package info (click to toggle)
pax-utils 1.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 728 kB
  • sloc: ansic: 8,752; sh: 671; python: 495; makefile: 303
file content (29 lines) | stat: -rw-r--r-- 773 bytes parent folder | download | duplicates (2)
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 Gentoo Foundation
 * Distributed under the terms of the GNU General Public License v2
 *
 * Copyright 2015 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) {}
static inline void security_init_pid(void) {}
#endif

#endif