- add upstream patch to only probe specific protocol if given as an option.
- add upstream patch to respect ulimit setting if it is greater than the limit to be requested.
This commit is contained in:
parent
4cb4c4f4c0
commit
d7489ff43a
38
autofs-5.0.7-check-for-protocol-option.patch
Normal file
38
autofs-5.0.7-check-for-protocol-option.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
autofs-5.0.7 - check for protocol option
|
||||||
|
|
||||||
|
From: Ian Kent <raven@themaw.net>
|
||||||
|
|
||||||
|
When a specific protocol is requested in the mount options only
|
||||||
|
that protocol should be probed for.
|
||||||
|
---
|
||||||
|
modules/mount_nfs.c | 10 ++++++++++
|
||||||
|
1 file changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
|
||||||
|
index 9de8a73..3d2ccea 100644
|
||||||
|
--- a/modules/mount_nfs.c
|
||||||
|
+++ b/modules/mount_nfs.c
|
||||||
|
@@ -156,6 +156,12 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
|
||||||
|
if (port < 0)
|
||||||
|
port = 0;
|
||||||
|
port_opt = cp;
|
||||||
|
+ } else if (strncmp("proto=udp", cp, o_len) == 0 ||
|
||||||
|
+ strncmp("udp", cp, o_len) == 0) {
|
||||||
|
+ vers &= ~TCP_SUPPORTED;
|
||||||
|
+ } else if (strncmp("proto=tcp", cp, o_len) == 0 ||
|
||||||
|
+ strncmp("tcp", cp, o_len) == 0) {
|
||||||
|
+ vers &= ~UDP_SUPPORTED;
|
||||||
|
}
|
||||||
|
/* Check for options that also make sense
|
||||||
|
with bind mounts */
|
||||||
|
@@ -167,6 +173,10 @@ int mount_mount(struct autofs_point *ap, const char *root, const char *name, int
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* In case both tcp and udp options were given */
|
||||||
|
+ if ((vers & NFS_PROTO_MASK) == 0)
|
||||||
|
+ vers |= NFS_PROTO_MASK;
|
||||||
|
+
|
||||||
|
debug(ap->logopt, MODPREFIX
|
||||||
|
"nfs options=\"%s\", nobind=%d, nosymlink=%d, ro=%d",
|
||||||
|
nfsoptions, nobind, nosymlink, ro);
|
@ -0,0 +1,30 @@
|
|||||||
|
autofs-5.0.7 - use ulimit max open files if greater than internal maximum
|
||||||
|
|
||||||
|
From: Ian Kent <raven@themaw.net>
|
||||||
|
|
||||||
|
When setting the maximum number of allowed file handles the current setting
|
||||||
|
should be checked before setting it. If the ulimit command has been used to
|
||||||
|
increase the maximum to larger than what automount would ask for then honour
|
||||||
|
it.
|
||||||
|
---
|
||||||
|
daemon/automount.c | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/daemon/automount.c b/daemon/automount.c
|
||||||
|
index 019637f..1d0b64e 100644
|
||||||
|
--- a/daemon/automount.c
|
||||||
|
+++ b/daemon/automount.c
|
||||||
|
@@ -2106,8 +2106,11 @@ int main(int argc, char *argv[])
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- rlim.rlim_cur = MAX_OPEN_FILES;
|
||||||
|
- rlim.rlim_max = MAX_OPEN_FILES;
|
||||||
|
+ res = getrlimit(RLIMIT_NOFILE, &rlim);
|
||||||
|
+ if (res == -1 || rlim.rlim_max <= MAX_OPEN_FILES) {
|
||||||
|
+ rlim.rlim_cur = MAX_OPEN_FILES;
|
||||||
|
+ rlim.rlim_max = MAX_OPEN_FILES;
|
||||||
|
+ }
|
||||||
|
res = setrlimit(RLIMIT_NOFILE, &rlim);
|
||||||
|
if (res)
|
||||||
|
printf("%s: can't increase open file limit - continuing",
|
10
autofs.spec
10
autofs.spec
@ -8,7 +8,7 @@
|
|||||||
Summary: A tool for automatically mounting and unmounting filesystems
|
Summary: A tool for automatically mounting and unmounting filesystems
|
||||||
Name: autofs
|
Name: autofs
|
||||||
Version: 5.0.7
|
Version: 5.0.7
|
||||||
Release: 23%{?dist}
|
Release: 24%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -94,6 +94,8 @@ Patch78: autofs-5.0.7-add-changlog-entry-for-coverity-fixes.patch
|
|||||||
Patch79: autofs-5.0.7-fix-probe-each-nfs-version-in-turn-for-singleton-mounts.patch
|
Patch79: autofs-5.0.7-fix-probe-each-nfs-version-in-turn-for-singleton-mounts.patch
|
||||||
Patch80: autofs-5.0.7-misc-man-page-fixes.patch
|
Patch80: autofs-5.0.7-misc-man-page-fixes.patch
|
||||||
Patch81: autofs-5.0.7-fix-add-null-check-in-parse_server_string.patch
|
Patch81: autofs-5.0.7-fix-add-null-check-in-parse_server_string.patch
|
||||||
|
Patch82: autofs-5.0.7-check-for-protocol-option.patch
|
||||||
|
Patch83: autofs-5.0.7-use-ulimit-max-open-files-if-greater-than-internal-maximum.patch
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
%if %{with_systemd}
|
%if %{with_systemd}
|
||||||
BuildRequires: systemd-units
|
BuildRequires: systemd-units
|
||||||
@ -232,6 +234,8 @@ echo %{version}-%{release} > .version
|
|||||||
%patch79 -p1
|
%patch79 -p1
|
||||||
%patch80 -p1
|
%patch80 -p1
|
||||||
%patch81 -p1
|
%patch81 -p1
|
||||||
|
%patch82 -p1
|
||||||
|
%patch83 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
|
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
|
||||||
@ -323,6 +327,10 @@ fi
|
|||||||
%dir /etc/auto.master.d
|
%dir /etc/auto.master.d
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 10 2013 Ian Kent <ikent@redhat.com> - 1:5.0.7-24
|
||||||
|
- check for protocol option.
|
||||||
|
- use ulimit max open files if greater than internal maximum.
|
||||||
|
|
||||||
* Fri Jun 28 2013 Ian Kent <ikent@redhat.com> - 1:5.0.7-23
|
* Fri Jun 28 2013 Ian Kent <ikent@redhat.com> - 1:5.0.7-23
|
||||||
- fix add null check in parse_server_string() (bz979155).
|
- fix add null check in parse_server_string() (bz979155).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user