- fix "nosymlink" option handling and add desription to man page.
This commit is contained in:
parent
3df55b8557
commit
d206fdab95
32
autofs-5.0.2-fix-mount-nfs-nosymlink.patch
Normal file
32
autofs-5.0.2-fix-mount-nfs-nosymlink.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/man/auto.master.5.in b/man/auto.master.5.in
|
||||
index 98afaa9..69c796e 100644
|
||||
--- a/man/auto.master.5.in
|
||||
+++ b/man/auto.master.5.in
|
||||
@@ -138,6 +138,14 @@ Treat errors when mounting file systems as fatal. This is important when
|
||||
multiple file systems should be mounted (`multimounts'). If this option
|
||||
is given, no file system is mounted at all if at least one file system
|
||||
can't be mounted.
|
||||
+.TP
|
||||
+.I "nosymlink"
|
||||
+This is an autofs specific option that is a pseudo mount option and
|
||||
+so is given without a leading dash. Historically this option was used
|
||||
+to prevent symlinking of local NFS mounts. Nowadays it can be used to
|
||||
+prevent bind mounting of local NFS filesystems as well. If you need to
|
||||
+prevent bind mounting for only specific entrys in a map then this
|
||||
+can be done by adding the "port=" mount option to the given entries.
|
||||
.SH GENERAL SYSTEM DEFAULTS CONFIGURATION
|
||||
.P
|
||||
The default value of several general settings may be changed in the
|
||||
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
|
||||
index 25f72b9..e7a9a8a 100644
|
||||
--- a/modules/mount_nfs.c
|
||||
+++ b/modules/mount_nfs.c
|
||||
@@ -214,7 +214,7 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
|
||||
port_opt = strstr(nfsoptions, "port=");
|
||||
|
||||
/* Port option specified, don't try to bind */
|
||||
- if (!port_opt && this->proximity == PROXIMITY_LOCAL) {
|
||||
+ if (!nosymlink && !port_opt && this->proximity == PROXIMITY_LOCAL) {
|
||||
/* Local host -- do a "bind" */
|
||||
const char *bind_options = ro ? "ro" : "";
|
||||
|
@ -4,7 +4,7 @@
|
||||
Summary: A tool for automatically mounting and unmounting filesystems
|
||||
Name: autofs
|
||||
Version: 5.0.2
|
||||
Release: 12
|
||||
Release: 13
|
||||
Epoch: 1
|
||||
License: GPL
|
||||
Group: System Environment/Daemons
|
||||
@ -25,6 +25,7 @@ Patch11: autofs-5.0.2-instance-stale-mark.patch
|
||||
Patch12: autofs-5.0.2-dont-fail-on-empty-master.patch
|
||||
Patch13: autofs-5.0.2-ldap-percent-hack.patch
|
||||
Patch14: autofs-5.0.2-consistent-random-selection-option-name.patch
|
||||
Patch15: autofs-5.0.2-fix-mount-nfs-nosymlink.patch
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel
|
||||
Conflicts: kernel < 2.6.17
|
||||
@ -81,6 +82,7 @@ echo %{version}-%{release} > .version
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
|
||||
%build
|
||||
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
|
||||
@ -133,6 +135,9 @@ fi
|
||||
%{_libdir}/autofs/
|
||||
|
||||
%changelog
|
||||
* Wed Aug 22 2007 Ian Kent <ikent@redhat.com> - 5.0.2-13
|
||||
- fix "nosymlink" option handling and add desription to man page.
|
||||
|
||||
* Tue Aug 21 2007 Ian Kent <ikent@redhat.com> - 5.0.2-12
|
||||
- change random multiple server selection option name to be consistent
|
||||
with upstream naming.
|
||||
|
Loading…
Reference in New Issue
Block a user