1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 01UPSTREAM_autofs-5.0.4-clear-rpc-client-on-lookup-fail.patch
4
## DP: Upstream patch on top of 5.0.4.
7
autofs-5.0.4 - clear rpc client on lookup fail
9
From: Ian Kent <raven@themaw.net>
11
If a name lookup failure occurs in create_tcp_client() or create_udp_client()
12
the client is destoryed and the file descriptor is closed at exit but the rpc
13
client isn't set to NULL. This leads to a subsequent SEGV when attempting to
14
use the invalid client.
19
2 files changed, 3 insertions(+), 0 deletions(-)
22
diff --git a/CHANGELOG b/CHANGELOG
23
index 00b455e..91edd14 100644
27
- fix file map lookup when reading included or nsswitch sources.
28
- use misc device ioctl interface by default, if available.
29
- fix call restorecon when misc device file doesn't exist.
30
+- clear rpc client on lookup fail.
32
4/11/2008 autofs-5.0.4
33
-----------------------
34
diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
35
index a822f1f..d034b29 100644
38
@@ -346,6 +346,7 @@ static CLIENT *create_udp_client(struct conn_info *info)
41
"hostname lookup failed: %s", gai_strerror(ret));
42
+ info->client = NULL;
46
@@ -470,6 +471,7 @@ static CLIENT *create_tcp_client(struct conn_info *info)
49
"hostname lookup failed: %s", gai_strerror(ret));
50
+ info->client = NULL;