summaryrefslogtreecommitdiffstats
path: root/sys/nfsserver
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-10-19 21:27:40 +0000
committerrwatson <rwatson@FreeBSD.org>2002-10-19 21:27:40 +0000
commit6fe81fed623b052e16f3a11228926d969dde5c4e (patch)
treebe40390bfc035df9e80224416107f83c10a8daa7 /sys/nfsserver
parent880b6632f281ce858a03131abd62b24ada1608b2 (diff)
downloadFreeBSD-src-6fe81fed623b052e16f3a11228926d969dde5c4e.zip
FreeBSD-src-6fe81fed623b052e16f3a11228926d969dde5c4e.tar.gz
Set the NOMACCHECK flag for namei()'s generated by the NFS server code.
We currently don't enforce protections on NFS-originated VOP's. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/nfsserver')
-rw-r--r--sys/nfsserver/nfs_srvsubs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c
index 1e06e3e..25d0d84 100644
--- a/sys/nfsserver/nfs_srvsubs.c
+++ b/sys/nfsserver/nfs_srvsubs.c
@@ -604,6 +604,7 @@ nfs_namei(struct nameidata *ndp, fhandle_t *fhp, int len,
struct componentname *cnp = &ndp->ni_cnd;
*retdirp = NULL;
+ cnp->cn_flags |= NOMACCHECK;
cnp->cn_pnbuf = uma_zalloc(namei_zone, M_WAITOK);
/*
OpenPOWER on IntegriCloud