Blame SOURCES/autofs-5.0.8-fix-ipv6-link-local-address-handling.patch

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