linux/include
Andrew G. Morgan 3898b1b4eb capabilities: implement per-process securebits
Filesystem capability support makes it possible to do away with (set)uid-0
based privilege and use capabilities instead.  That is, with filesystem
support for capabilities but without this present patch, it is (conceptually)
possible to manage a system with capabilities alone and never need to obtain
privilege via (set)uid-0.

Of course, conceptually isn't quite the same as currently possible since few
user applications, certainly not enough to run a viable system, are currently
prepared to leverage capabilities to exercise privilege.  Further, many
applications exist that may never get upgraded in this way, and the kernel
will continue to want to support their setuid-0 base privilege needs.

Where pure-capability applications evolve and replace setuid-0 binaries, it is
desirable that there be a mechanisms by which they can contain their
privilege.  In addition to leveraging the per-process bounding and inheritable
sets, this should include suppressing the privilege of the uid-0 superuser
from the process' tree of children.

The feature added by this patch can be leveraged to suppress the privilege
associated with (set)uid-0.  This suppression requires CAP_SETPCAP to
initiate, and only immediately affects the 'current' process (it is inherited
through fork()/exec()).  This reimplementation differs significantly from the
historical support for securebits which was system-wide, unwieldy and which
has ultimately withered to a dead relic in the source of the modern kernel.

With this patch applied a process, that is capable(CAP_SETPCAP), can now drop
all legacy privilege (through uid=0) for itself and all subsequently
fork()'d/exec()'d children with:

  prctl(PR_SET_SECUREBITS, 0x2f);

This patch represents a no-op unless CONFIG_SECURITY_FILE_CAPABILITIES is
enabled at configure time.

[akpm@linux-foundation.org: fix uninitialised var warning]
[serue@us.ibm.com: capabilities: use cap_task_prctl when !CONFIG_SECURITY]
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Reviewed-by: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Paul Moore <paul.moore@hp.com>
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 08:58:26 -07:00
..
acpi ACPI, cpuidle: Clarify C-state description in sysfs 2008-02-14 00:09:55 -05:00
asm-alpha mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-arm mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-avr32 mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-blackfin [Blackfin] arch: add include/boot .gitignore files 2008-04-25 08:29:11 +08:00
asm-cris mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-frv mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-generic bitops: use __fls for fls64 on 64-bit archs 2008-04-26 19:21:16 +02:00
asm-h8300 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-ia64 hugetlbfs: common code update for s390 2008-04-28 08:58:25 -07:00
asm-m32r mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-m68k mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-m68knommu Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-mips mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-mn10300 mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-parisc mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-powerpc hugetlbfs: common code update for s390 2008-04-28 08:58:25 -07:00
asm-ppc mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-s390 s390: implement pte special bit 2008-04-28 08:58:23 -07:00
asm-sh hugetlbfs: common code update for s390 2008-04-28 08:58:25 -07:00
asm-sparc mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-sparc64 hugetlbfs: common code update for s390 2008-04-28 08:58:25 -07:00
asm-um mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
asm-v850 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-x86 hugetlbfs: common code update for s390 2008-04-28 08:58:25 -07:00
asm-xtensa mm: introduce pte_special pte bit 2008-04-28 08:58:23 -07:00
crypto [CRYPTO] aes: Export generic setkey 2008-04-21 10:19:34 +08:00
keys KEYS: Fix the comment to match the file name in rxrpc-type.h. 2008-04-21 22:43:55 +00:00
linux capabilities: implement per-process securebits 2008-04-28 08:58:26 -07:00
math-emu
media V4L/DVB (7677): saa7134: Add/fix Beholder entries 2008-04-24 14:09:46 -03:00
mtd UBI: make ubi-header.h local 2008-04-17 11:31:58 +03:00
net IPv6 support for NFS server export caches 2008-04-23 16:13:36 -04:00
pcmcia pcmcia: replace kio_addr_t with unsigned int everywhere 2008-02-05 09:44:08 -08:00
rdma IB: convert struct class_device to struct device 2008-04-19 19:10:30 -07:00
rxrpc
scsi [SCSI] rework scsi_target allocation 2008-04-22 15:16:31 -05:00
sound [ALSA] Define MPU401 registers in sound/mpu401_uart.h 2008-04-24 12:38:22 +02:00
video atmel_lcdfb: backlight control 2008-02-06 10:41:16 -08:00
xen xen: add balloon driver 2008-04-24 23:57:33 +02:00
Kbuild