]> git.pld-linux.org Git - packages/autofs.git/blame - autofs-5.0.2-fix-mount-nfs-nosymlink.patch
- 5.0.3 with few official patches. ldap fixes needed
[packages/autofs.git] / autofs-5.0.2-fix-mount-nfs-nosymlink.patch
CommitLineData
3d551623
PG
1diff --git a/CHANGELOG b/CHANGELOG
2index c6ab15f..5aee44c 100644
3--- a/CHANGELOG
4+++ b/CHANGELOG
5@@ -16,6 +16,7 @@
6 - fix large file compile time option.
7 - don't fail on empty master map.
8 - add support for the "%" hack for case insensitive attribute schemas.
9+- fix "nosymlink" option handling and add desription to man page.
10
11 18/06/2007 autofs-5.0.2
12 -----------------------
13diff --git a/man/auto.master.5.in b/man/auto.master.5.in
14index 98afaa9..69c796e 100644
15--- a/man/auto.master.5.in
16+++ b/man/auto.master.5.in
17@@ -138,6 +138,14 @@ Treat errors when mounting file systems as fatal. This is important when
18 multiple file systems should be mounted (`multimounts'). If this option
19 is given, no file system is mounted at all if at least one file system
20 can't be mounted.
21+.TP
22+.I "nosymlink"
23+This is an autofs specific option that is a pseudo mount option and
24+so is given without a leading dash. Historically this option was used
25+to prevent symlinking of local NFS mounts. Nowadays it can be used to
26+prevent bind mounting of local NFS filesystems as well. If you need to
27+prevent bind mounting for only specific entrys in a map then this
28+can be done by adding the "port=" mount option to the given entries.
29 .SH GENERAL SYSTEM DEFAULTS CONFIGURATION
30 .P
31 The default value of several general settings may be changed in the
32diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
33index 25f72b9..e7a9a8a 100644
34--- a/modules/mount_nfs.c
35+++ b/modules/mount_nfs.c
36@@ -214,7 +214,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
37 port_opt = strstr(nfsoptions, "port=");
38
39 /* Port option specified, don't try to bind */
40- if (!port_opt && this->proximity == PROXIMITY_LOCAL) {
41+ if (!nosymlink && !port_opt && this->proximity == PROXIMITY_LOCAL) {
42 /* Local host -- do a "bind" */
43 const char *bind_options = ro ? "ro" : "";
44
This page took 0.287363 seconds and 4 git commands to generate.