summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-02 10:43:57 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-07-02 10:43:57 +0000
commitbbe605f9aacfb5c51816d65759fc6feddbe82478 (patch)
treeca4ac1c0c91d75799b9292ebd045fd583e94853f /sbin
parent1e3359bcedb12b3664f8e1638e450f8876566ab4 (diff)
permit -alldirs, but document it
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mountd/exports.526
-rw-r--r--sbin/mountd/mountd.c4
2 files changed, 27 insertions, 3 deletions
diff --git a/sbin/mountd/exports.5 b/sbin/mountd/exports.5
index c921143cbe1..cc3a8300f62 100644
--- a/sbin/mountd/exports.5
+++ b/sbin/mountd/exports.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: exports.5,v 1.2 1996/03/21 00:16:10 niklas Exp $
+.\" $OpenBSD: exports.5,v 1.3 1996/07/02 10:43:55 deraadt Exp $
.\" $NetBSD: exports.5,v 1.9 1996/02/18 11:57:50 fvdl Exp $
.\"
.\" Copyright (c) 1989, 1991, 1993
@@ -79,7 +79,8 @@ flag;
this form allows the host(s) to mount at any point within the filesystem,
including regular files if the
.Fl r
-option is used on mountd.
+option is used on mountd
+(see BUGS below).
The pathnames must not have any symbolic links in them and should not have
any "." or ".." components.
Mount points for a filesystem may appear on multiple lines each with
@@ -255,3 +256,24 @@ filesystem be specified on adjacent lines going down the tree.
You cannot specify a hostname that is also the name of a netgroup.
Specifying the full domain specification for a hostname can normally
circumvent the problem.
+.Pp
+Regarding
+.Fl alldirs ,
+because NFS mount filehandles are filesystem wide the
+.Fl alldirs
+option applies to exports of the entire filesystem -- even mountpoints
+that are higher up elsewhere in the directory hierarchy.
+Hence if the server has a filesystem
+.Sy /export
+and you wished to export the sub-directory
+.Bd -literal -offset indent
+/export/root/client -alldirs client.foo.com
+.Ed
+.Pp
+you must realize that this also allows mounts to be requested
+against other locations in the
+.Sy /export
+filesystem; thus the host client.foo.com is also permitted to
+mount the directory
+.Sy /export/root/client2
+if it exists.
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c
index f143636bd49..941b2fefcc4 100644
--- a/sbin/mountd/mountd.c
+++ b/sbin/mountd/mountd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mountd.c,v 1.7 1996/06/25 15:57:20 deraadt Exp $ */
+/* $OpenBSD: mountd.c,v 1.8 1996/07/02 10:43:56 deraadt Exp $ */
/* $NetBSD: mountd.c,v 1.31 1996/02/18 11:57:53 fvdl Exp $ */
/*
@@ -1627,9 +1627,11 @@ do_mount(ep, grp, exflags, anoncrp, dirp, dirplen, fsb)
return (1);
}
if (opt_flags & OP_ALLDIRS) {
+#if 0
syslog(LOG_ERR, "Could not remount %s: %m",
dirp);
return (1);
+#endif
}
/* back up over the last component */
while (*cp == '/' && cp > dirp)