linux/fs/nfs
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
..
blocklayout pnfs: release lseg in pnfs_generic_pg_cleanup 2015-02-03 11:06:44 -08:00
filelayout pnfs: Refactor the *_layout_mark_request_commit to use pnfs_layout_mark_request_commit 2015-02-18 07:20:35 -08:00
flexfilelayout pnfs: Refactor the *_layout_mark_request_commit to use pnfs_layout_mark_request_commit 2015-02-18 07:20:35 -08:00
objlayout nfs: add nfs_pgio_current_mirror helper 2015-02-03 11:06:48 -08:00
Kconfig kernel: conditionally support non-root users, groups and capabilities 2015-04-15 16:35:22 -07:00
Makefile pnfs/flexfiles: Add the FlexFile Layout Driver 2015-02-03 11:06:52 -08:00
cache_lib.c
cache_lib.h
callback.c nfs: don't call blocking operations while !TASK_RUNNING 2015-01-30 20:39:50 -05:00
callback.h
callback_proc.c NFSv4.1: Don't set up a backchannel if the server didn't agree to do so 2015-02-18 12:30:47 -08:00
callback_xdr.c NFSv4.1: Convert open-coded array allocation calls to kmalloc_array() 2015-02-11 19:02:52 -05:00
client.c NFSv4: Fix a race in NFSv4.1 server trunking discovery 2015-03-03 20:42:23 -05:00
delegation.c NFSv4: Ensure we skip delegations that are already being returned 2015-03-02 18:09:15 -05:00
delegation.h NFSv4: Fix races between nfs_remove_bad_delegation() and delegation return 2014-11-12 17:19:04 -05:00
dir.c NFS: Don't require a filehandle to refresh the inode in nfs_prime_dcache() 2015-03-01 23:23:07 -05:00
direct.c Merge branch 'iocb' into for-next 2015-04-11 22:24:41 -04:00
dns_resolve.c
dns_resolve.h
file.c Merge branch 'iocb' into for-next 2015-04-11 22:24:41 -04:00
fscache-index.c
fscache.c nfs: define nfs_inc_fscache_stats and using it as possible 2014-11-24 20:08:47 -05:00
fscache.h
getroot.c switch d_materialise_unique() users to d_splice_alias() 2014-11-19 13:01:20 -05:00
idmap.c pnfs/flexfiles: Add the FlexFile Layout Driver 2015-02-03 11:06:52 -08:00
inode.c NFS: Don't write enable new pages while an invalidation is proceeding 2015-03-03 13:58:08 -05:00
internal.h NFS: Add attribute update barriers to NFS writebacks 2015-03-01 23:23:06 -05:00
iostat.h nfs: define nfs_inc_fscache_stats and using it as possible 2014-11-24 20:08:47 -05:00
mount_clnt.c
namespace.c
netns.h pnfs/blocklayout: serialize GETDEVICEINFO calls 2014-11-12 14:22:52 -05:00
nfs.h
nfs2super.c
nfs2xdr.c nfs: save server READ/WRITE/COMMIT status 2015-02-03 11:06:40 -08:00
nfs3_fs.h nfsv3: introduce nfs3_set_ds_client 2015-02-03 11:06:34 -08:00
nfs3acl.c
nfs3client.c nfs: set hostname when creating nfsv3 ds connection 2015-02-03 11:06:38 -08:00
nfs3proc.c NFS: Add attribute update barriers to NFS writebacks 2015-03-01 23:23:06 -05:00
nfs3super.c nfsv3: introduce nfs3_set_ds_client 2015-02-03 11:06:34 -08:00
nfs3xdr.c NFSv3: Use the readdir fileid as the mounted-on-fileid 2015-03-01 23:23:07 -05:00
nfs4_fs.h Merge branch 'flexfiles' 2015-02-03 16:01:27 -05:00
nfs4client.c NFSv4: Fix a race in NFSv4.1 server trunking discovery 2015-03-03 20:42:23 -05:00
nfs4file.c nfs: Add DEALLOCATE support 2014-11-25 16:38:32 -05:00
nfs4getroot.c
nfs4namespace.c
nfs4proc.c NFSv4.1: Clear the old state by our client id before establishing a new lease 2015-03-03 21:52:30 -05:00
nfs4renewd.c
nfs4session.c NFSv4.1: Don't set up a backchannel if the server didn't agree to do so 2015-02-18 12:30:47 -08:00
nfs4session.h NFSv4.1: Clear the old state by our client id before establishing a new lease 2015-03-03 21:52:30 -05:00
nfs4state.c NFSv4.1: Clear the old state by our client id before establishing a new lease 2015-03-03 21:52:30 -05:00
nfs4super.c Merge branch 'for-3.20/bdi' of git://git.kernel.dk/linux-block 2015-02-12 13:50:21 -08:00
nfs4sysctl.c
nfs4trace.c
nfs4trace.h
nfs4xdr.c NFSv4.1: Clean up bind_conn_to_session 2015-02-18 13:11:09 -08:00
nfs42.h nfs: Add DEALLOCATE support 2014-11-25 16:38:32 -05:00
nfs42proc.c nfs: Add DEALLOCATE support 2014-11-25 16:38:32 -05:00
nfs42xdr.c nfs: Add DEALLOCATE support 2014-11-25 16:38:32 -05:00
nfsroot.c NFS: a couple off by ones 2015-01-30 20:43:30 -05:00
nfstrace.c
nfstrace.h
pagelist.c NFS client updates for Linux 3.20 2015-02-11 17:14:54 -08:00
pnfs.c pnfs: delete an unintended goto 2015-02-10 08:41:23 -05:00
pnfs.h pnfs: Refactor the *_layout_mark_request_commit to use pnfs_layout_mark_request_commit 2015-02-18 07:20:35 -08:00
pnfs_dev.c
pnfs_nfs.c pnfs: Refactor the *_layout_mark_request_commit to use pnfs_layout_mark_request_commit 2015-02-18 07:20:35 -08:00
proc.c NFS: Add attribute update barriers to NFS writebacks 2015-03-01 23:23:06 -05:00
read.c nfs: add mirroring support to pgio layer 2015-02-03 11:06:45 -08:00
super.c Merge branch 'for-3.20/bdi' of git://git.kernel.dk/linux-block 2015-02-12 13:50:21 -08:00
symlink.c
sysctl.c
unlink.c
write.c page_writeback: clean up mess around cancel_dirty_page() 2015-04-14 16:49:01 -07:00