aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/nfs/nfsport.h
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2020-08-27 23:57:30 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2020-08-27 23:57:30 +0000
commit6e4b6ff88fdefb673f934a200fc99d4413eb6488 (patch)
tree4e29cfd14c5950aac386359c00d4af864d40173c /sys/fs/nfs/nfsport.h
parent66ac5b2c5ab95c12c913ddc47da6bfebdf438f88 (diff)
downloadsrc-6e4b6ff88fdefb673f934a200fc99d4413eb6488.tar.gz
src-6e4b6ff88fdefb673f934a200fc99d4413eb6488.zip
Add flags to enable NFS over TLS to the NFS client and server.
An Internet Draft titled "Towards Remote Procedure Call Encryption By Default" (soon to be an RFC I think) describes how Sun RPC is to use TLS with NFS as a specific application case. Various commits prepared the NFS code to use KERN_TLS, mainly enabling use of ext_pgs mbufs for large RPC messages. r364475 added TLS support to the kernel RPC. This commit (which is the final one for kernel changes required to do NFS over TLS) adds support for three export flags: MNT_EXTLS - Requires a TLS connection. MNT_EXTLSCERT - Requires a TLS connection where the client presents a valid X.509 certificate during TLS handshake. MNT_EXTLSCERTUSER - Requires a TLS connection where the client presents a valid X.509 certificate with "user@domain" in the otherName field of the SubjectAltName during TLS handshake. Without these export options, clients are permitted, but not required, to use TLS. For the client, a new nmount(2) option called "tls" makes the client do a STARTTLS Null RPC and TLS handshake for all TCP connections used for the mount. The CLSET_TLS client control option is used to indicate to the kernel RPC that this should be done. Unless the above export flags or "tls" option is used, semantics should not change for the NFS client nor server. For NFS over TLS to work, the userspace daemons rpctlscd(8) { for client } or rpctlssd(8) daemon { for server } must be running.
Notes
Notes: svn path=/head/; revision=364896
Diffstat (limited to 'sys/fs/nfs/nfsport.h')
-rw-r--r--sys/fs/nfs/nfsport.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h
index 912cde95257f..a48736d50a79 100644
--- a/sys/fs/nfs/nfsport.h
+++ b/sys/fs/nfs/nfsport.h
@@ -1055,6 +1055,7 @@ bool ncl_pager_setsize(struct vnode *vp, u_quad_t *nsizep);
#define NFSHASOPENMODE(n) ((n)->nm_state & NFSSTA_OPENMODE)
#define NFSHASONEOPENOWN(n) (((n)->nm_flag & NFSMNT_ONEOPENOWN) != 0 && \
(n)->nm_minorvers > 0)
+#define NFSHASTLS(n) (((n)->nm_newflag & NFSMNT_TLS) != 0)
/*
* Set boottime.