rpms/autofs/F-10 autofs-5.0.3-hsterror.patch, NONE, 1.1 autofs.spec, 1.262, 1.263
Ian Kent
iankent at fedoraproject.org
Fri Nov 6 05:20:09 UTC 2009
Author: iankent
Update of /cvs/pkgs/rpms/autofs/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9513
Modified Files:
autofs.spec
Added Files:
autofs-5.0.3-hsterror.patch
Log Message:
* Fri Nov 6 2009 Ian Kent <ikent at redhat.com> - 5.0.4-44
- fix incorrect host name lookup error message (bz483756).
autofs-5.0.3-hsterror.patch:
lib/rpc_subs.c | 15 +++++++++++----
modules/replicated.c | 6 ++++--
2 files changed, 15 insertions(+), 6 deletions(-)
--- NEW FILE autofs-5.0.3-hsterror.patch ---
autofs-5.0.3 - fix incorrect host name lookup error message
From: Masatake YAMATO <yamato at redhat.com>
When an error occurs looking up a hostname autofs fails to use the
correct error number to error string translation function.
---
lib/rpc_subs.c | 15 +++++++++++----
modules/replicated.c | 6 ++++--
2 files changed, 15 insertions(+), 6 deletions(-)
--- autofs-5.0.3.orig/lib/rpc_subs.c
+++ autofs-5.0.3/lib/rpc_subs.c
@@ -98,8 +98,11 @@ static CLIENT *create_udp_client(struct
ret = gethostbyname_r(info->host, php,
buf, HOST_ENT_BUF_SIZE, &result, &ghn_errno);
if (ret || !result) {
- int err = ghn_errno == -1 ? errno : ghn_errno;
- char *estr = strerror_r(err, buf, HOST_ENT_BUF_SIZE);
+ char *estr;
+ if (ghn_errno == -1)
+ estr = strerror_r(errno, buf, HOST_ENT_BUF_SIZE);
+ else
+ estr = (char *) hstrerror(ghn_errno);
logerr("hostname lookup failed: %s", estr);
goto out_close;
}
@@ -306,9 +309,13 @@ static CLIENT *create_tcp_client(struct
ret = gethostbyname_r(info->host, php,
buf, HOST_ENT_BUF_SIZE, &result, &ghn_errno);
+ error(LOGOPT_ANY, "ret %d result %p", ret, result);
if (ret || !result) {
- int err = ghn_errno == -1 ? errno : ghn_errno;
- char *estr = strerror_r(err, buf, HOST_ENT_BUF_SIZE);
+ char *estr;
+ if (ghn_errno == -1)
+ estr = strerror_r(errno, buf, HOST_ENT_BUF_SIZE);
+ else
+ estr = (char *) hstrerror(ghn_errno);
logerr("hostname lookup failed: %s", estr);
goto out_close;
}
--- autofs-5.0.3.orig/modules/replicated.c
+++ autofs-5.0.3/modules/replicated.c
@@ -984,10 +984,12 @@ static int add_host_addrs(struct host **
ret = gethostbyname_r(host, phe,
buf, MAX_IFC_BUF, &result, &ghn_errno);
if (ret || !result) {
+ char *estr;
if (ghn_errno == -1)
- logmsg("host %s: lookup failure %d", host, errno);
+ estr = strerror_r(errno, buf, HOST_ENT_BUF_SIZE);
else
- logmsg("host %s: lookup failure %d", host, ghn_errno);
+ estr = (char *) hstrerror(ghn_errno);
+ logerr("hostname lookup failed: %s", estr);
return 0;
}
Index: autofs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/autofs/F-10/autofs.spec,v
retrieving revision 1.262
retrieving revision 1.263
diff -u -p -r1.262 -r1.263
--- autofs.spec 4 May 2009 06:58:26 -0000 1.262
+++ autofs.spec 6 Nov 2009 05:20:08 -0000 1.263
@@ -4,7 +4,7 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.3
-Release: 43
+Release: 44
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
@@ -76,6 +76,7 @@ Patch63: autofs-5.0.3-use-CLOEXEC-flag-s
Patch64: autofs-5.0.3-renew-sasl-creds-upon-reconnect-fail.patch
Patch65: autofs-5.0.3-fix-memory-leak-reading-ldap-master.patch
Patch66: autofs-5.0.4-add-lsb-init-script-parameter-block.patch
+Patch67: autofs-5.0.3-hsterror.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
Requires: kernel >= 2.6.17
@@ -183,6 +184,7 @@ echo %{version}-%{release} > .version
%patch64 -p1
%patch65 -p1
%patch66 -p1
+%patch67 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -235,6 +237,9 @@ fi
%{_libdir}/autofs/
%changelog
+* Fri Nov 6 2009 Ian Kent <ikent at redhat.com> - 5.0.4-44
+- fix incorrect host name lookup error message (bz483756).
+
* Mon May 4 2009 Ian Kent <ikent at redhat.com> - 5.0.4-43
- update uris list lcoking patch.
- renew sasl creds upon reconnect fail.
More information about the fedora-extras-commits
mailing list