aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/securebits.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/securebits.h')
-rw-r--r--include/linux/securebits.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/linux/securebits.h b/include/linux/securebits.h
index c1f19dbceb05..92f09bdf1175 100644
--- a/include/linux/securebits.h
+++ b/include/linux/securebits.h
@@ -7,14 +7,15 @@
7 inheritance of root-permissions and suid-root executable under 7 inheritance of root-permissions and suid-root executable under
8 compatibility mode. We raise the effective and inheritable bitmasks 8 compatibility mode. We raise the effective and inheritable bitmasks
9 *of the executable file* if the effective uid of the new process is 9 *of the executable file* if the effective uid of the new process is
10 0. If the real uid is 0, we raise the inheritable bitmask of the 10 0. If the real uid is 0, we raise the effective (legacy) bit of the
11 executable file. */ 11 executable file. */
12#define SECURE_NOROOT 0 12#define SECURE_NOROOT 0
13#define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */ 13#define SECURE_NOROOT_LOCKED 1 /* make bit-0 immutable */
14 14
15/* When set, setuid to/from uid 0 does not trigger capability-"fixes" 15/* When set, setuid to/from uid 0 does not trigger capability-"fixup".
16 to be compatible with old programs relying on set*uid to loose 16 When unset, to provide compatiblility with old programs relying on
17 privileges. When unset, setuid doesn't change privileges. */ 17 set*uid to gain/lose privilege, transitions to/from uid 0 cause
18 capabilities to be gained/lost. */
18#define SECURE_NO_SETUID_FIXUP 2 19#define SECURE_NO_SETUID_FIXUP 2
19#define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */ 20#define SECURE_NO_SETUID_FIXUP_LOCKED 3 /* make bit-2 immutable */
20 21
@@ -26,10 +27,10 @@
26#define SECURE_KEEP_CAPS 4 27#define SECURE_KEEP_CAPS 4
27#define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */ 28#define SECURE_KEEP_CAPS_LOCKED 5 /* make bit-4 immutable */
28 29
29/* Each securesetting is implemented using two bits. One bit specify 30/* Each securesetting is implemented using two bits. One bit specifies
30 whether the setting is on or off. The other bit specify whether the 31 whether the setting is on or off. The other bit specify whether the
31 setting is fixed or not. A setting which is fixed cannot be changed 32 setting is locked or not. A setting which is locked cannot be
32 from user-level. */ 33 changed from user-level. */
33#define issecure_mask(X) (1 << (X)) 34#define issecure_mask(X) (1 << (X))
34#define issecure(X) (issecure_mask(X) & current->securebits) 35#define issecure(X) (issecure_mask(X) & current->securebits)
35 36