summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsserver/nfs_nfsdsubs.c
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2009-05-14 21:39:08 +0000
committerrmacklem <rmacklem@FreeBSD.org>2009-05-14 21:39:08 +0000
commitef1be3984d15c3d19d3f36350bd596329e59ae95 (patch)
tree5c710d90ce1b15129bc2c43590e433010077b9c7 /sys/fs/nfsserver/nfs_nfsdsubs.c
parenta17331003b62d651244b335330ed0202c58d376e (diff)
downloadFreeBSD-src-ef1be3984d15c3d19d3f36350bd596329e59ae95.zip
FreeBSD-src-ef1be3984d15c3d19d3f36350bd596329e59ae95.tar.gz
Apply changes to the experimental nfs server so that it uses the security
flavors as exported in FreeBSD-CURRENT. This allows it to use a slightly modified mountd.c instead of a different utility. Approved by: kib (mentor)
Diffstat (limited to 'sys/fs/nfsserver/nfs_nfsdsubs.c')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdsubs.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdsubs.c b/sys/fs/nfsserver/nfs_nfsdsubs.c
index 51f367a..252eb0d 100644
--- a/sys/fs/nfsserver/nfs_nfsdsubs.c
+++ b/sys/fs/nfsserver/nfs_nfsdsubs.c
@@ -2019,3 +2019,25 @@ nfsd_init(void)
NFSBZERO(nfs_v2pubfh, NFSX_V2FH);
}
+/*
+ * Check the v4 root exports.
+ * Return 0 if ok, 1 otherwise.
+ */
+int
+nfsd_checkrootexp(struct nfsrv_descript *nd)
+{
+
+ if ((nd->nd_flag & (ND_GSS | ND_EXAUTHSYS)) == ND_EXAUTHSYS)
+ return (0);
+ if ((nd->nd_flag & (ND_GSSINTEGRITY | ND_EXGSSINTEGRITY)) ==
+ (ND_GSSINTEGRITY | ND_EXGSSINTEGRITY))
+ return (0);
+ if ((nd->nd_flag & (ND_GSSPRIVACY | ND_EXGSSPRIVACY)) ==
+ (ND_GSSPRIVACY | ND_EXGSSPRIVACY))
+ return (0);
+ if ((nd->nd_flag & (ND_GSS | ND_GSSINTEGRITY | ND_GSSPRIVACY |
+ ND_EXGSS)) == (ND_GSS | ND_EXGSS))
+ return (0);
+ return (1);
+}
+
OpenPOWER on IntegriCloud