Skip to contentSkip to conversation

Is autofs4 8-bit compatible?

DISCUSSION atlantos41 2 participants 2 messages Apr 12, 2005 – Apr 13, 2005 Kernel automounter

lore
Share & tools
lore

atlantos41

author
#0 lore raw
Quoted 31 lines · On Tuesday 05 April 2005 16:51, [email protected] wrote:

I don't really think this will do the trick but please try it anyway.

It includes the first patch and removes another isprint call.

Ian

--- autofs-4.1.3/lib/cat_path.c.wide-char 2005-04-05 21:28:36.000000000
+0800 +++ autofs-4.1.3/lib/cat_path.c 2005-04-05 21:29:01.000000000 +0800

(quoted diff) +1 -2
@@ -48,7 +48,7 @@ int _strlen(const char *str, int max)
  {
       char *s = (char *) str;
 
-      while (isprint(*s++) && max--) ;
+      while (*s++ && max--) ;
 
       if (max < 0)
               return 0;
--- autofs-4.1.3/modules/lookup_file.c.wide-char       2005-04-05

21:30:10.000000000 +0800 +++ autofs-4.1.3/modules/lookup_file.c 2005-04-05
21:30:45.000000000 +0800 @@ -148,7 +148,7 @@ static int read_one(FILE *f, char *key,

                               else if (ch == '*') {
                                       state = st_star;
                                       *(kptr++) = ch;
(quoted diff) +1 -1
-                              } else if (isprint((char) ch)) {
+                              } else {
                                       state = st_compare;
                                       *(kptr++) = ch;
                               }

Review static int read_one(FILE *f, char *key, · line 169

Quoted 7 lines
(quoted diff) +1 -1
@@ -164,7 +164,7 @@ static int read_one(FILE *f, char *key,
                               getting = got_real;
                               state = st_entspc;
                       } else if (escape == esc_char);
-                      else if (isprint((char) ch))
+                      else
                               *(kptr++) = ch;
                       break;

With this patch everything is OK. It mounts and umounts shares with 8-bit chars in share's name.

maintainer
#1 lore raw

Thanks for the feedabck.

I took the chance and included this in the 4.1.4 release.

Ian

Quoted 43 lines · On Tue, 12 Apr 2005, atlantos41 wrote:
Quoted 31 lines · On Tuesday 05 April 2005 16:51, [email protected] wrote:

I don't really think this will do the trick but please try it anyway.

It includes the first patch and removes another isprint call.

Ian

--- autofs-4.1.3/lib/cat_path.c.wide-char 2005-04-05 21:28:36.000000000
+0800 +++ autofs-4.1.3/lib/cat_path.c 2005-04-05 21:29:01.000000000 +0800

(quoted diff) +1 -2
@@ -48,7 +48,7 @@ int _strlen(const char *str, int max)
  {
       char *s = (char *) str;
 
-      while (isprint(*s++) && max--) ;
+      while (*s++ && max--) ;
 
       if (max < 0)
               return 0;
--- autofs-4.1.3/modules/lookup_file.c.wide-char       2005-04-05

21:30:10.000000000 +0800 +++ autofs-4.1.3/modules/lookup_file.c 2005-04-05
21:30:45.000000000 +0800 @@ -148,7 +148,7 @@ static int read_one(FILE *f, char *key,

                               else if (ch == '*') {
                                       state = st_star;
                                       *(kptr++) = ch;
(quoted diff) +1 -1
-                              } else if (isprint((char) ch)) {
+                              } else {
                                       state = st_compare;
                                       *(kptr++) = ch;
                               }

Review static int read_one(FILE *f, char *key, · line 169

Quoted 7 lines
(quoted diff) +1 -1
@@ -164,7 +164,7 @@ static int read_one(FILE *f, char *key,
                               getting = got_real;
                               state = st_entspc;
                       } else if (escape == esc_char);
-                      else if (isprint((char) ch))
+                      else
                               *(kptr++) = ch;
                       break;

With this patch everything is OK. It mounts and umounts shares with 8-bit chars in share's name.