aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/securebits.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/securebits.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/securebits.h')
-rw-r--r--include/linux/securebits.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/securebits.h b/include/linux/securebits.h
new file mode 100644
index 000000000000..5b0617840fa4
--- /dev/null
+++ b/include/linux/securebits.h
@@ -0,0 +1,30 @@
1#ifndef _LINUX_SECUREBITS_H
2#define _LINUX_SECUREBITS_H 1
3
4#define SECUREBITS_DEFAULT 0x00000000
5
6extern unsigned securebits;
7
8/* When set UID 0 has no special privileges. When unset, we support
9 inheritance of root-permissions and suid-root executable under
10 compatibility mode. We raise the effective and inheritable bitmasks
11 *of the executable file* if the effective uid of the new process is
12 0. If the real uid is 0, we raise the inheritable bitmask of the
13 executable file. */
14#define SECURE_NOROOT 0
15
16/* When set, setuid to/from uid 0 does not trigger capability-"fixes"
17 to be compatible with old programs relying on set*uid to loose
18 privileges. When unset, setuid doesn't change privileges. */
19#define SECURE_NO_SETUID_FIXUP 2
20
21/* Each securesetting is implemented using two bits. One bit specify
22 whether the setting is on or off. The other bit specify whether the
23 setting is fixed or not. A setting which is fixed cannot be changed
24 from user-level. */
25
26#define issecure(X) ( (1 << (X+1)) & SECUREBITS_DEFAULT ? \
27 (1 << (X)) & SECUREBITS_DEFAULT : \
28 (1 << (X)) & securebits )
29
30#endif /* !_LINUX_SECUREBITS_H */