Skip to contentSkip to conversation

Is autofs4 8-bit compatible?

DISCUSSION atlantos41 2 participants 3 messages Apr 3, 2005 – Apr 5, 2005

Subsystems (2)
lore
Share & tools
lore

atlantos41

author
#0 lore raw
Quoted 15 lines · On Sunday 27 March 2005 06:01, [email protected] wrote:

Could you try this one please?

--- autofs-4.1.3/modules/lookup_file.c.wide_char 2005-03-27
10:47:16.000000000 +0800 +++ autofs-4.1.3/modules/lookup_file.c 2005-03-27
10:48:32.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;

I tried this patch and now automount mounts all shares. But automount can't umount mounted shares with 8-bit chars in share names - I have entries in syslog like (I start autofs with command `automount --timeout=60 --verbose /smb file /etc/auto.smb``):

Apr  2 16:29:15 localhost automount[29323]: umount_multi: no mounts found under /smb/test_data
Apr  2 16:29:15 localhost automount[29323]: expired /smb/test_data
Apr  2 16:30:15 localhost automount[29384]: umount_multi: no mounts found under /smb/test_data
Apr  2 16:30:15 localhost automount[29384]: expired /smb/test_data
Apr  2 16:31:15 localhost automount[29384]: umount_multi: no mounts found under /smb/test_data
Apr  2 16:31:15 localhost automount[29384]: expired /smb/test_data
#1 lore raw
Quoted 2 lines · On Sun, 3 Apr 2005, atlantos41 wrote:

I tried this patch and now automount mounts all shares. But automount can't umount mounted shares with 8-bit chars in share names - I have entries in syslog like (I start autofs with command `automount --timeout=60 --verbose /smb file /etc/auto.smb``):

Thanks.
At least it's a step forward.

I'll keep on it.

Ian

#2 lore raw
Quoted 10 lines · On Sun, 3 Apr 2005 [email protected] wrote:
Quoted 5 lines · On Sun, 3 Apr 2005, atlantos41 wrote:

I tried this patch and now automount mounts all shares. But automount can't umount mounted shares with 8-bit chars in share names - I have entries in syslog like (I start autofs with command `automount --timeout=60 --verbose /smb file /etc/auto.smb``):

Thanks.
At least it's a step forward.

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

lib/cat_path.c renamed from lib/cat_path.c.wide-char +1 -1
@@ -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;
modules/lookup_file.c renamed from modules/lookup_file.c.wide-char +2 -2
@@ -148,7 +148,7 @@ static int read_one(FILE *f, char *key,
 				else if (ch == '*') {
 					state = st_star;
 					*(kptr++) = ch;
-				} else if (isprint((char) ch)) {
+				} else {
 					state = st_compare;
 					*(kptr++) = ch;
 				}
@@ -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;