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