- fix timeout in connect_nb().
This commit is contained in:
parent
f0c2949bbf
commit
52ae86eada
44
autofs-5.0.5-fix-timeout-in-connect_nb.patch
Normal file
44
autofs-5.0.5-fix-timeout-in-connect_nb.patch
Normal file
@ -0,0 +1,44 @@
|
||||
autofs-5.0.5 - fix timeout in connect_nb()
|
||||
|
||||
From: Ian Kent <raven@themaw.net>
|
||||
|
||||
When changing the timed wait from using select(2) to poll(2) in
|
||||
connect_nb(), to overcome the 1024 file handle limit of select(),
|
||||
the wait timeout was not converted from seconds to milliseconds.
|
||||
---
|
||||
|
||||
CHANGELOG | 1 +
|
||||
lib/rpc_subs.c | 7 +++++++
|
||||
2 files changed, 8 insertions(+), 0 deletions(-)
|
||||
|
||||
|
||||
diff --git a/CHANGELOG b/CHANGELOG
|
||||
index ccf2d32..dd093e2 100644
|
||||
--- a/CHANGELOG
|
||||
+++ b/CHANGELOG
|
||||
@@ -11,6 +11,7 @@
|
||||
- add "preen" fsck for ext4 mounts.
|
||||
- don't use master_lex_destroy() to clear parse buffer.
|
||||
- make documentation for set-log-priority clearer.
|
||||
+- fix timeout in connect_nb().
|
||||
|
||||
03/09/2009 autofs-5.0.5
|
||||
-----------------------
|
||||
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
|
||||
index cafc775..628f0fc 100644
|
||||
--- a/lib/rpc_subs.c
|
||||
+++ b/lib/rpc_subs.c
|
||||
@@ -161,6 +161,13 @@ static int connect_nb(int fd, struct sockaddr *addr, socklen_t len, struct timev
|
||||
if (ret == 0)
|
||||
goto done;
|
||||
|
||||
+ if (timeout != -1) {
|
||||
+ if (timeout >= (INT_MAX - 1)/1000)
|
||||
+ timeout = INT_MAX - 1;
|
||||
+ else
|
||||
+ timeout = timeout * 1000;
|
||||
+ }
|
||||
+
|
||||
pfd[0].fd = fd;
|
||||
pfd[0].events = POLLOUT;
|
||||
|
@ -4,7 +4,7 @@
|
||||
Summary: A tool for automatically mounting and unmounting filesystems
|
||||
Name: autofs
|
||||
Version: 5.0.5
|
||||
Release: 6%{?dist}
|
||||
Release: 8%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
Group: System Environment/Daemons
|
||||
@ -21,6 +21,7 @@ Patch8: autofs-5.0.5-fix-stale-init-for-file-map-instance.patch
|
||||
Patch9: autofs-5.0.5-fix-ext4-fsck-at-mount.patch
|
||||
Patch10: autofs-5.0.5-dont-use-master_lex_destroy-to-clear-parse-buffer.patch
|
||||
Patch11: autofs-5.0.5-make-documentation-for-set-log-priority-clearer.patch
|
||||
Patch12: autofs-5.0.5-fix-timeout-in-connect_nb.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 module-init-tools util-linux nfs-utils e2fsprogs libtirpc-devel
|
||||
Requires: kernel >= 2.6.17
|
||||
@ -73,6 +74,7 @@ echo %{version}-%{release} > .version
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
|
||||
%build
|
||||
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
|
||||
@ -125,6 +127,9 @@ fi
|
||||
%{_libdir}/autofs/
|
||||
|
||||
%changelog
|
||||
* Mon Nov 23 2009 Ian Kent <ikent@redhat.com> - 1:5.0.5-8
|
||||
- fix timeout in connect_nb().
|
||||
|
||||
* Mon Nov 16 2009 Ian Kent <ikent@redhat.com> - 1:5.0.5-6
|
||||
- don't use master_lex_destroy() to clear parse buffer.
|
||||
- make documentation for set-log-priority clearer.
|
||||
|
Loading…
Reference in New Issue
Block a user