- update patch fix initialization in rpc create_client() (bz821660).
This commit is contained in:
parent
465c67deba
commit
251f556ce1
@ -2,20 +2,29 @@ autofs-5.0.6 - fix initialization in rpc create_client()
|
|||||||
|
|
||||||
From: Ian Kent <ikent@redhat.com>
|
From: Ian Kent <ikent@redhat.com>
|
||||||
|
|
||||||
Sometimes the RPC function create_client() function gets a
|
Sometimes the RPC function create_client() gets a non-null stack
|
||||||
non-null stack variable passed in which can cause a SEGV.
|
variable passed in which can cause a SEGV. Fix it by initializing
|
||||||
Fix it by initializing the passed in variable.
|
the passed in variable.
|
||||||
---
|
---
|
||||||
|
|
||||||
lib/rpc_subs.c | 4 +++-
|
CHANGELOG | 1 +
|
||||||
1 files changed, 3 insertions(+), 1 deletions(-)
|
lib/rpc_subs.c | 11 ++++++++---
|
||||||
|
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
|
||||||
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
|
--- autofs-5.0.6.orig/CHANGELOG
|
||||||
index f051e43..85796d1 100644
|
+++ autofs-5.0.6/CHANGELOG
|
||||||
--- a/lib/rpc_subs.c
|
@@ -40,6 +40,7 @@
|
||||||
+++ b/lib/rpc_subs.c
|
- fix sss wildcard match.
|
||||||
@@ -316,6 +316,7 @@ static int create_client(struct conn_info *info, CLIENT **client)
|
- fix dlopen() error handling in sss module.
|
||||||
|
- fix configure string length tests for sss library.
|
||||||
|
+- fix initialization in rpc create_client().
|
||||||
|
|
||||||
|
28/06/2011 autofs-5.0.6
|
||||||
|
-----------------------
|
||||||
|
--- autofs-5.0.6.orig/lib/rpc_subs.c
|
||||||
|
+++ autofs-5.0.6/lib/rpc_subs.c
|
||||||
|
@@ -316,6 +316,7 @@ static int create_client(struct conn_inf
|
||||||
int fd, ret;
|
int fd, ret;
|
||||||
|
|
||||||
fd = RPC_ANYSOCK;
|
fd = RPC_ANYSOCK;
|
||||||
@ -23,7 +32,19 @@ index f051e43..85796d1 100644
|
|||||||
|
|
||||||
if (info->client) {
|
if (info->client) {
|
||||||
if (!clnt_control(info->client, CLGET_FD, (char *) &fd)) {
|
if (!clnt_control(info->client, CLGET_FD, (char *) &fd)) {
|
||||||
@@ -377,12 +378,13 @@ static int create_client(struct conn_info *info, CLIENT **client)
|
@@ -344,7 +345,10 @@ static int create_client(struct conn_inf
|
||||||
|
memset(&hints, 0, sizeof(hints));
|
||||||
|
hints.ai_flags = AI_ADDRCONFIG;
|
||||||
|
hints.ai_family = AF_UNSPEC;
|
||||||
|
- hints.ai_socktype = SOCK_DGRAM;
|
||||||
|
+ if (info->proto->p_proto == IPPROTO_UDP)
|
||||||
|
+ hints.ai_socktype = SOCK_DGRAM;
|
||||||
|
+ else
|
||||||
|
+ hints.ai_socktype = SOCK_STREAM;
|
||||||
|
|
||||||
|
ret = getaddrinfo(info->host, NULL, &hints, &ai);
|
||||||
|
if (ret) {
|
||||||
|
@@ -377,12 +381,13 @@ static int create_client(struct conn_inf
|
||||||
|
|
||||||
freeaddrinfo(ai);
|
freeaddrinfo(ai);
|
||||||
|
|
||||||
@ -38,3 +59,12 @@ index f051e43..85796d1 100644
|
|||||||
/* Close socket fd on destroy, as is default for rpcowned fds */
|
/* Close socket fd on destroy, as is default for rpcowned fds */
|
||||||
if (!clnt_control(*client, CLSET_FD_CLOSE, NULL)) {
|
if (!clnt_control(*client, CLSET_FD_CLOSE, NULL)) {
|
||||||
clnt_destroy(*client);
|
clnt_destroy(*client);
|
||||||
|
@@ -800,7 +805,7 @@ static int rpc_get_exports_proto(struct
|
||||||
|
(xdrproc_t) xdr_void, NULL,
|
||||||
|
(xdrproc_t) xdr_exports, (caddr_t) exp,
|
||||||
|
info->timeout);
|
||||||
|
- if (status != RPC_PROGVERSMISMATCH)
|
||||||
|
+ if (status == RPC_SUCCESS)
|
||||||
|
break;
|
||||||
|
if (++vers_entry > 2)
|
||||||
|
break;
|
||||||
|
@ -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.6
|
Version: 5.0.6
|
||||||
Release: 17%{?dist}
|
Release: 18%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -261,6 +261,11 @@ fi
|
|||||||
%dir /etc/auto.master.d
|
%dir /etc/auto.master.d
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue May 22 2012 Ian Kent <ikent@redhat.com> - 1:5.0.6-18
|
||||||
|
- [abrt] autofs-5.0.6-16.fc17: clnt_dg_control:
|
||||||
|
Process /usr/sbin/automount was killed by signal 11 (SIGSEGV)
|
||||||
|
- update patch fix initialization in rpc create_client() (bz821660).
|
||||||
|
|
||||||
* Wed May 16 2012 Ian Kent <ikent@redhat.com> - 1:5.0.6-17
|
* Wed May 16 2012 Ian Kent <ikent@redhat.com> - 1:5.0.6-17
|
||||||
- [abrt] autofs-5.0.6-16.fc17: clnt_dg_control:
|
- [abrt] autofs-5.0.6-16.fc17: clnt_dg_control:
|
||||||
Process /usr/sbin/automount was killed by signal 11 (SIGSEGV)
|
Process /usr/sbin/automount was killed by signal 11 (SIGSEGV)
|
||||||
|
Loading…
Reference in New Issue
Block a user