]>
Commit | Line | Data |
---|---|---|
e5fd101c PS |
1 | autofs-5.0.4 - fix rpc fd leak |
2 | ||
3 | From: Ian Kent <raven@themaw.net> | |
4 | ||
5 | Recent changes which introduced the ability to handle to cope with | |
6 | IPv6 addresses causes a file descriptor leak in the RPC library. | |
7 | --- | |
8 | ||
9 | CHANGELOG | 1 + | |
10 | lib/rpc_subs.c | 11 ----------- | |
11 | 2 files changed, 1 insertions(+), 11 deletions(-) | |
12 | ||
13 | ||
14 | diff --git a/CHANGELOG b/CHANGELOG | |
15 | index 3fd97d3..7f27f5e 100644 | |
16 | --- a/CHANGELOG | |
17 | +++ b/CHANGELOG | |
18 | @@ -56,6 +56,7 @@ | |
19 | - fix double free in sasl_bind(). | |
20 | - mannual umount recovery fixes. | |
21 | - fix map type info parse error. | |
22 | +- fix an RPC fd leak. | |
23 | ||
24 | 4/11/2008 autofs-5.0.4 | |
25 | ----------------------- | |
26 | diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c | |
27 | index d034b29..cafc775 100644 | |
28 | --- a/lib/rpc_subs.c | |
29 | +++ b/lib/rpc_subs.c | |
30 | @@ -253,17 +253,6 @@ static CLIENT *rpc_do_create_client(struct sockaddr *addr, struct conn_info *inf | |
31 | return NULL; | |
32 | } | |
33 | ||
34 | - if (!info->client) { | |
35 | - *fd = open_sock(addr->sa_family, type, proto); | |
36 | - if (*fd < 0) | |
37 | - return NULL; | |
38 | - | |
39 | - if (bind(*fd, laddr, slen) < 0) { | |
40 | - close(*fd); | |
41 | - return NULL; | |
42 | - } | |
43 | - } | |
44 | - | |
45 | switch (info->proto->p_proto) { | |
46 | case IPPROTO_UDP: | |
47 | if (!info->client) { |