All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: "Lan Yixun (dlan)" <dennis.yxun@gmail.com>
Cc: autofs mailing list <autofs@vger.kernel.org>
Subject: [PATCH 1/5] autofs-5.0.8 - fix ipv6 link local address handling
Date: Tue, 24 Dec 2013 16:02:12 +0800	[thread overview]
Message-ID: <20131224080212.8321.83966.stgit@perseus.fritz.box> (raw)
In-Reply-To: <20131224075909.8321.95699.stgit@perseus.fritz.box>

Stop the validate_location() function from choking on link local
ipv6 addresses.
---
 lib/rpc_subs.c      |    6 ++++++
 modules/parse_sun.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/rpc_subs.c b/lib/rpc_subs.c
index 2365b6e..9d5b2f5 100644
--- a/lib/rpc_subs.c
+++ b/lib/rpc_subs.c
@@ -669,6 +669,12 @@ static int create_client(struct conn_info *info, CLIENT **client)
 			goto done;
 		if (ret == -EHOSTUNREACH)
 			goto out_close;
+		if (ret == -EINVAL) {
+			char buf[MAX_ERR_BUF];
+			char *estr = strerror_r(-ret, buf, MAX_ERR_BUF);
+			error(LOGOPT_ANY, "connect() failed: %s", estr);
+			goto out_close;
+		}
 
 		if (!info->client && fd != RPC_ANYSOCK) {
 			close(fd);
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index 30820b5..e5a4def 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -862,7 +862,7 @@ static int validate_location(unsigned int logopt, char *loc)
 			    *ptr == '-' || *ptr == '.' || *ptr == '_' ||
 			    *ptr == ',' || *ptr == '(' || *ptr == ')' ||
 			    *ptr == '#' || *ptr == '@' || *ptr == ':' ||
-			    *ptr == '[' || *ptr == ']')) {
+			    *ptr == '[' || *ptr == ']' || *ptr == '%')) {
 				error(logopt, "invalid character \"%c\" "
 				      "found in location %s", *ptr, loc);
 				return 0;


  reply	other threads:[~2013-12-24  8:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-24  8:02 [PATCH 0/5] fyi, here are the patches that I haven't yet committed Ian Kent
2013-12-24  8:02 ` Ian Kent [this message]
2013-12-24  8:02 ` [PATCH 2/5] autofs-5.0.8 - fix fix ipv6 libtirpc getport Ian Kent
2013-12-24  8:02 ` [PATCH 3/5] autofs-5.0.8 - get_nfs_info() should query portmapper if port is not given Ian Kent
2013-12-24  8:02 ` [PATCH 4/5] autofs-5.0.8 - fix rpc_portmap_getport() proto not set Ian Kent
2013-12-24  8:02 ` [PATCH 5/5] autofs-5.0.8 - fix options compare Ian Kent
2013-12-24  8:38 ` [PATCH 0/5] fyi, here are the patches that I haven't yet committed Dennis Lan (dlan)
2013-12-24  9:04   ` Ian Kent
2013-12-24  9:42     ` Dennis Lan (dlan)
2013-12-24 10:34       ` Ian Kent
2013-12-27  6:11         ` Dennis Lan (dlan)
2013-12-27  6:36           ` Dennis Lan (dlan)
2013-12-27  7:30             ` Dennis Lan (dlan)
2013-12-27  8:56               ` Ian Kent
2013-12-28  2:41                 ` Ian Kent
2013-12-28 12:09                   ` Dennis Lan (dlan)
2013-12-29 11:14                     ` Ian Kent
2013-12-29 11:26                       ` Ian Kent
2013-12-30  7:38                         ` Dennis Lan (dlan)
2013-12-29 11:36               ` Ian Kent
2013-12-30  7:44                 ` Dennis Lan (dlan)
2013-12-27  8:50             ` Ian Kent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131224080212.8321.83966.stgit@perseus.fritz.box \
    --to=raven@themaw.net \
    --cc=autofs@vger.kernel.org \
    --cc=dennis.yxun@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.