|
|
d906a6 |
autofs-5.0.8 - fix ipv6 link local address handling
|
|
|
d906a6 |
|
|
|
d906a6 |
From: Ian Kent <raven@themaw.net>
|
|
|
d906a6 |
|
|
|
d906a6 |
Stop the validate_location() function from choking on link local
|
|
|
d906a6 |
ipv6 addresses.
|
|
|
d906a6 |
---
|
|
|
d906a6 |
lib/rpc_subs.c | 6 ++++++
|
|
|
d906a6 |
modules/parse_sun.c | 2 +-
|
|
|
d906a6 |
2 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
d906a6 |
|
|
|
d906a6 |
--- autofs-5.0.7.orig/lib/rpc_subs.c
|
|
|
d906a6 |
+++ autofs-5.0.7/lib/rpc_subs.c
|
|
|
d906a6 |
@@ -669,6 +669,12 @@ static int create_client(struct conn_inf
|
|
|
d906a6 |
goto done;
|
|
|
d906a6 |
if (ret == -EHOSTUNREACH)
|
|
|
d906a6 |
goto out_close;
|
|
|
d906a6 |
+ if (ret == -EINVAL) {
|
|
|
d906a6 |
+ char buf[MAX_ERR_BUF];
|
|
|
d906a6 |
+ char *estr = strerror_r(-ret, buf, MAX_ERR_BUF);
|
|
|
d906a6 |
+ error(LOGOPT_ANY, "connect() failed: %s", estr);
|
|
|
d906a6 |
+ goto out_close;
|
|
|
d906a6 |
+ }
|
|
|
d906a6 |
|
|
|
d906a6 |
if (!info->client && fd != RPC_ANYSOCK) {
|
|
|
d906a6 |
close(fd);
|
|
|
d906a6 |
--- autofs-5.0.7.orig/modules/parse_sun.c
|
|
|
d906a6 |
+++ autofs-5.0.7/modules/parse_sun.c
|
|
|
d906a6 |
@@ -893,7 +893,7 @@ static int validate_location(unsigned in
|
|
|
d906a6 |
*ptr == '-' || *ptr == '.' || *ptr == '_' ||
|
|
|
d906a6 |
*ptr == ',' || *ptr == '(' || *ptr == ')' ||
|
|
|
d906a6 |
*ptr == '#' || *ptr == '@' || *ptr == ':' ||
|
|
|
d906a6 |
- *ptr == '[' || *ptr == ']')) {
|
|
|
d906a6 |
+ *ptr == '[' || *ptr == ']' || *ptr == '%')) {
|
|
|
d906a6 |
error(logopt, "invalid character \"%c\" "
|
|
|
d906a6 |
"found in location %s", *ptr, loc);
|
|
|
d906a6 |
return 0;
|