linux/drivers/staging
Iulia Manda 2813893f8b kernel: conditionally support non-root users, groups and capabilities
There are a lot of embedded systems that run most or all of their
functionality in init, running as root:root.  For these systems,
supporting multiple users is not necessary.

This patch adds a new symbol, CONFIG_MULTIUSER, that makes support for
non-root users, non-root groups, and capabilities optional.  It is enabled
under CONFIG_EXPERT menu.

When this symbol is not defined, UID and GID are zero in any possible case
and processes always have all capabilities.

The following syscalls are compiled out: setuid, setregid, setgid,
setreuid, setresuid, getresuid, setresgid, getresgid, setgroups,
getgroups, setfsuid, setfsgid, capget, capset.

Also, groups.c is compiled out completely.

In kernel/capability.c, capable function was moved in order to avoid
adding two ifdef blocks.

This change saves about 25 KB on a defconfig build.  The most minimal
kernels have total text sizes in the high hundreds of kB rather than
low MB.  (The 25k goes down a bit with allnoconfig, but not that much.

The kernel was booted in Qemu.  All the common functionalities work.
Adding users/groups is not possible, failing with -ENOSYS.

Bloat-o-meter output:
add/remove: 7/87 grow/shrink: 19/397 up/down: 1675/-26325 (-24650)

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Iulia Manda <iulia.manda21@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Tested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-15 16:35:22 -07:00
..
android staging: android: ion_test: Add the MODULE_LICENSE macro 2015-04-03 15:13:52 +02:00
board
clocking-wizard
comedi staging: comedi: remove "comedi_fc.h" 2015-04-03 13:14:08 +02:00
dgap Staging: dgap: Use setup_timer to combine initialization 2015-03-16 16:17:31 +01:00
dgnc staging: dgnc_sysfs: Replace printk(KERN_ERR ) with pr_err() 2015-04-01 17:37:57 +02:00
emxx_udc Staging: emuxx_udc: replace pr_* with dev_* 2015-03-16 16:28:31 +01:00
fbtft staging: fbtft: Fix typo in fbtft 2015-03-26 13:07:29 +01:00
fsl-mc staging: fsl-mc: Changed version matching rules for MC object drivers 2015-04-03 13:55:03 +02:00
ft1000 staging: ft1000: Drop unneeded cast on netdev_priv 2015-04-03 14:00:14 +02:00
fwserial staging: fwserial: remove extra parentheses around function arguments 2015-03-15 18:41:11 +01:00
gdm72xx Staging: gdm72xx: use !x instead of x == NULL 2015-03-16 16:28:47 +01:00
gdm724x Staging: gdm724x: replace pr_* with dev_* 2015-03-18 11:21:33 +01:00
goldfish staging/goldfish/goldfish_audio: Fix annotations 2015-03-20 14:13:17 +01:00
gs_fpgaboot staging: Remove <linux/moduleparam.h> header. 2015-03-01 17:09:52 -08:00
i2o Staging: i2o: Remove indentation of labels 2015-03-26 10:40:31 +01:00
iio Merge 4.0-rc7 into staging-next 2015-04-07 11:03:02 +02:00
lustre kernel: conditionally support non-root users, groups and capabilities 2015-04-15 16:35:22 -07:00
media Staging: media: remove useless dev_info to avoid null ptr dereference 2015-03-23 22:42:40 +01:00
mt29f_spinand staging: mt29f_spinand: remove pointer to pointer cast in function argument 2015-03-15 18:41:11 +01:00
netlogic staging: netlogic: allocate right size in devm_kzalloc 2015-03-20 14:13:17 +01:00
nvec Staging driver patches for 4.1-rc1 2015-04-13 17:37:33 -07:00
octeon staging: octeon-ethernet: delete cvm_oct_set_carrier() 2015-04-03 13:57:28 +02:00
octeon-usb staging: octeon-usb: make CVMX_WAIT_FOR_FIELD32 to take condition expression 2015-04-03 13:57:28 +02:00
olpc_dcon staging/olpc: drop pci dependencies 2015-04-03 13:56:03 +02:00
ozwpan staging: ozwpan: implement error handling in ozwpan_init() 2015-03-26 13:13:13 +01:00
panel staging: panel: fix lcd type 2015-03-26 11:00:22 +01:00
rtl8188eu Staging: rtl8188eu: replace kzalloc and memcpy by kmemdup 2015-03-26 13:16:19 +01:00
rtl8192e staging: rtl8192e: Remove dead code 2015-04-03 15:29:31 +02:00
rtl8192u Staging: rtl8192u: use correct array for debug output 2015-04-03 15:40:49 +02:00
rtl8712 staging: rtl8712: Drop unneeded cast on netdev_priv 2015-04-03 15:15:40 +02:00
rtl8723au Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2015-04-15 09:00:47 -07:00
rts5208 staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros 2015-03-26 13:17:05 +01:00
skein Staging: skein: Remove do-while(0) from single statement macros 2015-03-15 18:41:15 +01:00
slicoss Staging: slicoss: Remove redundant and disabled code block 2015-03-27 00:02:52 +01:00
sm7xxfb staging: sm7xxfb: disable pci device 2015-04-03 13:55:03 +02:00
sm750fb Revert "Staging: sm750fb: Fix C99 Comments" 2015-04-04 12:00:25 +02:00
speakup staging: speakup: Fix warning of line over 80 characters. 2015-04-03 13:43:45 +02:00
ste_rmi4 Staging: ste_rmi4: Use SIMPLE_DEV_PM_OPS() macro 2015-03-20 13:37:31 +01:00
unisys Merge branch 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2015-04-14 15:31:03 -07:00
vme staging: vme: mmap() support for vme_user 2015-03-06 17:03:22 -08:00
vt6655 staging: vt6655: use ieee80211_tx_info to select packet type. 2015-04-03 15:12:54 +02:00
vt6656 Merge 4.0-rc5 into staging-testing 2015-03-23 21:36:48 +01:00
wlan-ng Staging: wlan-ng: Remove typedef prism2sta_accesslist_t 2015-03-23 22:41:16 +01:00
xgifb staging: xgifb: remove extra parentheses around right bit shift operations 2015-03-06 15:22:43 -08:00
Kconfig staging: fsl-mc: Freescale Management Complex (fsl-mc) bus driver 2015-03-06 17:28:09 -08:00
Makefile staging: fsl-mc: Freescale Management Complex (fsl-mc) bus driver 2015-03-06 17:28:09 -08:00
staging.c