summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mountd
diff options
context:
space:
mode:
authorrink <rink@FreeBSD.org>2006-10-19 19:46:49 +0000
committerrink <rink@FreeBSD.org>2006-10-19 19:46:49 +0000
commite1c2e84f500d629db7590cdd958c6f20f3c2ea09 (patch)
tree0e1b1d827516521157cba82041789c51db23d2cc /usr.sbin/mountd
parentfdfc992d93258f355d457acf8ea17914c8b7c442 (diff)
downloadFreeBSD-src-e1c2e84f500d629db7590cdd958c6f20f3c2ea09.zip
FreeBSD-src-e1c2e84f500d629db7590cdd958c6f20f3c2ea09.tar.gz
My previous commit made it impossible to export / over NFS; this small
change fixes this. Reported by: Lin Jui-Nan Eric < ericlin dot jnlin at gmail dot com > Submitted by: Erik Trulsson < ertr1013 at student dot uu dot se > (commit is inspired by a patch from Erik) Pointyhat to: me Reviewed by: stable@ Approved by: imp (mentor) MFC after: 3 days
Diffstat (limited to 'usr.sbin/mountd')
-rw-r--r--usr.sbin/mountd/mountd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index a171910..4556f4e 100644
--- a/usr.sbin/mountd/mountd.c
+++ b/usr.sbin/mountd/mountd.c
@@ -1918,7 +1918,12 @@ do_mount(struct exportlist *ep, struct grouplist *grp, int exflags,
iov[5].iov_base = fsb->f_mntfromname; /* "from" */
iov[5].iov_len = strlen(fsb->f_mntfromname) + 1;
- while (nmount(iov, iovlen, fsb->f_flags) < 0) {
+ /*
+ * Remount the filesystem, but chop off the MNT_ROOTFS flag
+ * as it is used internally (and will result in an error if
+ * specified)
+ */
+ while (nmount(iov, iovlen, fsb->f_flags & ~MNT_ROOTFS) < 0) {
if (cp)
*cp-- = savedc;
else
OpenPOWER on IntegriCloud