From: Fabio Olive Leite <fleite@redhat.com>
To: autofs@linux.kernel.org
Subject: [patch] Underscore in hostnames
Date: Thu, 7 Dec 2006 21:22:12 -0200 [thread overview]
Message-ID: <20061207232212.GA1994@sleipnir.redhat.com> (raw)
Hi all,
Even though underscores are not really valid in hostnames, many people
use them and they seem to be tolerated in many places. So I propose
the one-liner below to see what you think.
This one-liner adds underscore as a valid hostname character for NFS
mounts.
Signed-off-by: Fabio Olive Leite <fleite@redhat.com>
---
parse_sun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
index 6f10a4f..c849ff3 100644
--- a/modules/parse_sun.c
+++ b/modules/parse_sun.c
@@ -691,7 +691,7 @@ static int validate_location(char *loc)
if (check_colon(ptr)) {
while (*ptr && *ptr != ':') {
if (!(isalnum(*ptr) ||
- *ptr == '-' || *ptr == '.' ||
+ *ptr == '-' || *ptr == '.' || *ptr == '_' ||
*ptr == ',' || *ptr == '(' || *ptr == ')'))
return 0;
ptr++;
Kind regards,
Fábio
--
ex sed lex awk yacc, e pluribus unix, amem
next reply other threads:[~2006-12-07 23:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 23:22 Fabio Olive Leite [this message]
2006-12-11 3:56 ` [patch] Underscore in hostnames Ian Kent
2006-12-11 12:05 ` Fabio Olive Leite
2006-12-11 14:16 ` Jeff Moyer
2006-12-11 15:34 ` Ian Kent
2006-12-11 15:57 ` Peter Staubach
2006-12-11 16:17 ` Jeff Moyer
2006-12-11 16:58 ` Fabio Olive Leite
2006-12-13 3:03 ` Ian Kent
2006-12-13 13:26 ` Peter Staubach
2006-12-11 16:20 ` 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=20061207232212.GA1994@sleipnir.redhat.com \
--to=fleite@redhat.com \
--cc=autofs@linux.kernel.org \
/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.