All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] Underscore in hostnames
@ 2006-12-07 23:22 Fabio Olive Leite
  2006-12-11  3:56 ` Ian Kent
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Olive Leite @ 2006-12-07 23:22 UTC (permalink / raw)
  To: autofs

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-12-13 13:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07 23:22 [patch] Underscore in hostnames Fabio Olive Leite
2006-12-11  3:56 ` 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

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.