]> git.pld-linux.org Git - packages/autofs.git/blob - autofs-5.0.4-clear-rpc-client-on-lookup-fail.patch
bdb93941d10faad11cdaafb5239e1658fcabbba8
[packages/autofs.git] / autofs-5.0.4-clear-rpc-client-on-lookup-fail.patch
1 autofs-5.0.4 - clear rpc client on lookup fail
2
3 From: Ian Kent <raven@themaw.net>
4
5 If a name lookup failure occurs in create_tcp_client() or create_udp_client()
6 the client is destoryed and the file descriptor is closed at exit but the rpc
7 client isn't set to NULL. This leads to a subsequent SEGV when attempting to
8 use the invalid client.
9 ---
10
11  CHANGELOG      |    1 +
12  lib/rpc_subs.c |    2 ++
13  2 files changed, 3 insertions(+), 0 deletions(-)
14
15
16 diff --git a/CHANGELOG b/CHANGELOG
17 index 00b455e..91edd14 100644
18 --- a/CHANGELOG
19 +++ b/CHANGELOG
20 @@ -34,6 +34,7 @@
21  - fix file map lookup when reading included or nsswitch sources.
22  - use misc device ioctl interface by default, if available.
23  - fix call restorecon when misc device file doesn't exist.
24 +- clear rpc client on lookup fail.
25  
26  4/11/2008 autofs-5.0.4
27  -----------------------
28 diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
29 index a822f1f..d034b29 100644
30 --- a/lib/rpc_subs.c
31 +++ b/lib/rpc_subs.c
32 @@ -346,6 +346,7 @@ static CLIENT *create_udp_client(struct conn_info *info)
33         if (ret) {
34                 error(LOGOPT_ANY,
35                       "hostname lookup failed: %s", gai_strerror(ret));
36 +               info->client = NULL;
37                 goto out_close;
38         }
39  
40 @@ -470,6 +471,7 @@ static CLIENT *create_tcp_client(struct conn_info *info)
41         if (ret) {
42                 error(LOGOPT_ANY,
43                       "hostname lookup failed: %s", gai_strerror(ret));
44 +               info->client = NULL;
45                 goto out_close;
46         }
47  
This page took 0.038466 seconds and 2 git commands to generate.