2019-05-19 20:07:45 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2009-01-22 16:07:41 +08:00
|
|
|
config NFS_FS
|
|
|
|
tristate "NFS client support"
|
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-16 07:16:41 +08:00
|
|
|
depends on INET && FILE_LOCKING && MULTIUSER
|
2009-01-22 16:07:41 +08:00
|
|
|
select LOCKD
|
|
|
|
select SUNRPC
|
|
|
|
select NFS_ACL_SUPPORT if NFS_V3_ACL
|
|
|
|
help
|
|
|
|
Choose Y here if you want to access files residing on other
|
|
|
|
computers using Sun's Network File System protocol. To compile
|
|
|
|
this file system support as a module, choose M here: the module
|
|
|
|
will be called nfs.
|
|
|
|
|
|
|
|
To mount file systems exported by NFS servers, you also need to
|
|
|
|
install the user space mount.nfs command which can be found in
|
|
|
|
the Linux nfs-utils package, available from http://linux-nfs.org/.
|
|
|
|
Information about using the mount command is available in the
|
|
|
|
mount(8) man page. More detail about the Linux NFS client
|
|
|
|
implementation is available via the nfs(5) man page.
|
|
|
|
|
|
|
|
Below you can choose which versions of the NFS protocol are
|
|
|
|
available in the kernel to mount NFS servers. Support for NFS
|
|
|
|
version 2 (RFC 1094) is always available when NFS_FS is selected.
|
|
|
|
|
|
|
|
To configure a system which mounts its root file system via NFS
|
|
|
|
at boot time, say Y here, select "Kernel level IP
|
|
|
|
autoconfiguration" in the NETWORK menu, and select "Root file
|
|
|
|
system on NFS" below. You cannot compile this file system as a
|
|
|
|
module in this case.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
2012-05-11 04:47:19 +08:00
|
|
|
config NFS_V2
|
2012-07-31 04:05:23 +08:00
|
|
|
tristate "NFS client support for NFS version 2"
|
2012-05-11 04:47:19 +08:00
|
|
|
depends on NFS_FS
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
This option enables support for version 2 of the NFS protocol
|
|
|
|
(RFC 1094) in the kernel's NFS client.
|
|
|
|
|
|
|
|
If unsure, say Y.
|
|
|
|
|
2009-01-22 16:07:41 +08:00
|
|
|
config NFS_V3
|
2012-07-31 04:05:24 +08:00
|
|
|
tristate "NFS client support for NFS version 3"
|
2009-01-22 16:07:41 +08:00
|
|
|
depends on NFS_FS
|
2012-05-11 04:47:20 +08:00
|
|
|
default y
|
2009-01-22 16:07:41 +08:00
|
|
|
help
|
|
|
|
This option enables support for version 3 of the NFS protocol
|
|
|
|
(RFC 1813) in the kernel's NFS client.
|
|
|
|
|
|
|
|
If unsure, say Y.
|
|
|
|
|
|
|
|
config NFS_V3_ACL
|
|
|
|
bool "NFS client support for the NFSv3 ACL protocol extension"
|
|
|
|
depends on NFS_V3
|
|
|
|
help
|
|
|
|
Some NFS servers support an auxiliary NFSv3 ACL protocol that
|
|
|
|
Sun added to Solaris but never became an official part of the
|
|
|
|
NFS version 3 protocol. This protocol extension allows
|
|
|
|
applications on NFS clients to manipulate POSIX Access Control
|
|
|
|
Lists on files residing on NFS servers. NFS servers enforce
|
|
|
|
ACLs on local files whether this protocol is available or not.
|
|
|
|
|
|
|
|
Choose Y here if your NFS server supports the Solaris NFSv3 ACL
|
|
|
|
protocol extension and you want your NFS client to allow
|
|
|
|
applications to access and modify ACLs on files on the server.
|
|
|
|
|
|
|
|
Most NFS servers don't support the Solaris NFSv3 ACL protocol
|
|
|
|
extension. You can choose N here or specify the "noacl" mount
|
|
|
|
option to prevent your NFS client from trying to use the NFSv3
|
|
|
|
ACL protocol.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
|
|
|
config NFS_V4
|
2012-07-31 04:05:25 +08:00
|
|
|
tristate "NFS client support for NFS version 4"
|
2010-08-05 02:38:01 +08:00
|
|
|
depends on NFS_FS
|
2010-09-13 07:57:50 +08:00
|
|
|
select SUNRPC_GSS
|
2012-02-09 02:21:38 +08:00
|
|
|
select KEYS
|
2009-01-22 16:07:41 +08:00
|
|
|
help
|
|
|
|
This option enables support for version 4 of the NFS protocol
|
|
|
|
(RFC 3530) in the kernel's NFS client.
|
|
|
|
|
|
|
|
To mount NFS servers using NFSv4, you also need to install user
|
|
|
|
space programs which can be found in the Linux nfs-utils package,
|
|
|
|
available from http://linux-nfs.org/.
|
|
|
|
|
2010-08-05 02:38:01 +08:00
|
|
|
If unsure, say Y.
|
2012-08-01 07:45:12 +08:00
|
|
|
|
|
|
|
config NFS_SWAP
|
|
|
|
bool "Provide swap over NFS support"
|
|
|
|
default n
|
2024-06-11 20:08:33 +08:00
|
|
|
depends on NFS_FS && SWAP
|
2012-08-01 07:45:12 +08:00
|
|
|
select SUNRPC_SWAP
|
|
|
|
help
|
|
|
|
This option enables swapon to work on files located on NFS mounts.
|
2009-01-22 16:07:41 +08:00
|
|
|
|
2009-04-01 21:21:46 +08:00
|
|
|
config NFS_V4_1
|
2012-10-04 01:54:50 +08:00
|
|
|
bool "NFS client support for NFSv4.1"
|
|
|
|
depends on NFS_V4
|
2011-07-14 07:20:49 +08:00
|
|
|
select SUNRPC_BACKCHANNEL
|
2009-04-01 21:21:46 +08:00
|
|
|
help
|
|
|
|
This option enables support for minor version 1 of the NFSv4 protocol
|
2011-08-11 06:29:21 +08:00
|
|
|
(RFC 5661) in the kernel's NFS client.
|
2009-04-01 21:21:46 +08:00
|
|
|
|
2010-08-05 02:39:16 +08:00
|
|
|
If unsure, say N.
|
2009-04-01 21:21:46 +08:00
|
|
|
|
2013-05-23 00:50:38 +08:00
|
|
|
config NFS_V4_2
|
|
|
|
bool "NFS client support for NFSv4.2"
|
|
|
|
depends on NFS_V4_1
|
|
|
|
help
|
|
|
|
This option enables support for minor version 2 of the NFSv4 protocol
|
|
|
|
in the kernel's NFS client.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
2010-10-20 12:17:59 +08:00
|
|
|
config PNFS_FILE_LAYOUT
|
|
|
|
tristate
|
2012-05-22 03:30:41 +08:00
|
|
|
depends on NFS_V4_1
|
2013-11-14 00:50:33 +08:00
|
|
|
default NFS_V4
|
2010-10-20 12:17:59 +08:00
|
|
|
|
2011-07-31 08:52:39 +08:00
|
|
|
config PNFS_BLOCK
|
2011-08-12 05:29:25 +08:00
|
|
|
tristate
|
2012-05-22 03:30:41 +08:00
|
|
|
depends on NFS_V4_1 && BLK_DEV_DM
|
2013-11-14 00:50:33 +08:00
|
|
|
default NFS_V4
|
2011-07-31 08:52:39 +08:00
|
|
|
|
2014-12-12 06:02:04 +08:00
|
|
|
config PNFS_FLEXFILE_LAYOUT
|
|
|
|
tristate
|
|
|
|
depends on NFS_V4_1 && NFS_V3
|
|
|
|
default m
|
|
|
|
|
2012-02-18 04:20:24 +08:00
|
|
|
config NFS_V4_1_IMPLEMENTATION_ID_DOMAIN
|
|
|
|
string "NFSv4.1 Implementation ID Domain"
|
|
|
|
depends on NFS_V4_1
|
|
|
|
default "kernel.org"
|
|
|
|
help
|
|
|
|
This option defines the domain portion of the implementation ID that
|
|
|
|
may be sent in the NFS exchange_id operation. The value must be in
|
|
|
|
the format of a DNS domain name and should be set to the DNS domain
|
|
|
|
name of the distribution.
|
|
|
|
If the NFS client is unchanged from the upstream kernel, this
|
|
|
|
option should be set to the default "kernel.org".
|
|
|
|
|
2013-10-18 02:14:04 +08:00
|
|
|
config NFS_V4_1_MIGRATION
|
|
|
|
bool "NFSv4.1 client support for migration"
|
|
|
|
depends on NFS_V4_1
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
This option makes the NFS client advertise to NFSv4.1 servers that
|
|
|
|
it can support NFSv4 migration.
|
|
|
|
|
|
|
|
The NFSv4.1 pieces of the Linux NFSv4 migration implementation are
|
|
|
|
still experimental. If you are not an NFSv4 developer, say N here.
|
|
|
|
|
2013-05-23 00:50:46 +08:00
|
|
|
config NFS_V4_SECURITY_LABEL
|
|
|
|
bool
|
|
|
|
depends on NFS_V4_2 && SECURITY
|
|
|
|
default y
|
|
|
|
|
2009-01-22 16:07:41 +08:00
|
|
|
config ROOT_NFS
|
|
|
|
bool "Root file system on NFS"
|
|
|
|
depends on NFS_FS=y && IP_PNP
|
|
|
|
help
|
|
|
|
If you want your system to mount its root file system via NFS,
|
|
|
|
choose Y here. This is common practice for managing systems
|
|
|
|
without local permanent storage. For details, read
|
2009-10-28 02:41:35 +08:00
|
|
|
<file:Documentation/filesystems/nfs/nfsroot.txt>.
|
2009-01-22 16:07:41 +08:00
|
|
|
|
|
|
|
Most people say N here.
|
2009-04-03 23:42:42 +08:00
|
|
|
|
|
|
|
config NFS_FSCACHE
|
2010-02-27 01:25:14 +08:00
|
|
|
bool "Provide NFS client caching support"
|
2009-04-03 23:42:42 +08:00
|
|
|
depends on NFS_FS=m && FSCACHE || NFS_FS=y && FSCACHE=y
|
|
|
|
help
|
|
|
|
Say Y here if you want NFS data to be cached locally on disc through
|
|
|
|
the general filesystem cache manager
|
2010-08-11 16:37:53 +08:00
|
|
|
|
|
|
|
config NFS_USE_LEGACY_DNS
|
|
|
|
bool "Use the legacy NFS DNS resolver"
|
|
|
|
depends on NFS_V4
|
|
|
|
help
|
|
|
|
The kernel now provides a method for translating a host name into an
|
|
|
|
IP address. Select Y here if you would rather use your own DNS
|
|
|
|
resolver script.
|
|
|
|
|
|
|
|
If unsure, say N
|
|
|
|
|
|
|
|
config NFS_USE_KERNEL_DNS
|
|
|
|
bool
|
|
|
|
depends on NFS_V4 && !NFS_USE_LEGACY_DNS
|
|
|
|
select DNS_RESOLVER
|
|
|
|
default y
|
2012-03-19 02:07:42 +08:00
|
|
|
|
|
|
|
config NFS_DEBUG
|
|
|
|
bool
|
|
|
|
depends on NFS_FS && SUNRPC_DEBUG
|
|
|
|
select CRC32
|
|
|
|
default y
|