Skip to contentSkip to conversation

Is autofs4 8-bit compatible?

DISCUSSION atlantos41 2 participants 4 messages Feb 24, 2005 – Mar 7, 2005 Kernel automounter

lore
Share & tools
lore

atlantos41

author
#0 lore raw

Hi.
I start automount with command:
automount --timeout=60 /smb file /etc/auto.smb

where /etc/auto.smb is
test_data<cyrchar>est -fstype=smbfs ://test/data<cyrchar>est

where <cyrchar> is one cyrillic char, for example "Ô", i. e. ~ echo -n <cyrchar> | hexdump
0000000 00d4
0000001

When I try to change directory to /smb/test_data<cyrchar>est, then autofs fails with messages in syslog:
automount[13111]: failed to mount /smb/test_data

But if I change key in /etc/auto.smb to 7-bit, for example "test_data<cyrchar>est" to "test_datatest":
test_datatest -fstype=smbfs ://test/data<cyrchar>est

and then restart automount, autofs works as it should be.

This problem appears to be in autofs 4.1.3 and autofs 4.1.4_beta1, but not in autofs 3.1.7.

#1 lore raw

On Thu, 24 Feb 2005, atlantos41 wrote:

In short no.

Quoted 16 lines

Hi.
I start automount with command:
automount --timeout=60 /smb file /etc/auto.smb

where /etc/auto.smb is
test_data<cyrchar>est -fstype=smbfs ://test/data<cyrchar>est

where <cyrchar> is one cyrillic char, for example "т", i. e. ~ echo -n <cyrchar> | hexdump
0000000 00d4
0000001

When I try to change directory to /smb/test_data<cyrchar>est, then autofs fails with messages in syslog:
automount[13111]: failed to mount /smb/test_data

Quoted 8 lines

But if I change key in /etc/auto.smb to 7-bit, for example "test_data<cyrchar>est" to "test_datatest":
test_datatest -fstype=smbfs ://test/data<cyrchar>est

and then restart automount, autofs works as it should be.

This problem appears to be in autofs 4.1.3 and autofs 4.1.4_beta1, but not in autofs 3.1.7.

I'll check but I think v3 didn't actually do specific character comparisons. Along the way this has made its way into v4.

Perhaps it's not a big deal to change.
I'm not sure yet.

Ian

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

#2 lore raw
In reply to atlantos41
Quoted 16 lines · On Thu, 24 Feb 2005, atlantos41 wrote:

Hi.
I start automount with command:
automount --timeout=60 /smb file /etc/auto.smb

where /etc/auto.smb is
test_data<cyrchar>est -fstype=smbfs ://test/data<cyrchar>est

where <cyrchar> is one cyrillic char, for example "т", i. e. ~ echo -n <cyrchar> | hexdump
0000000 00d4
0000001

When I try to change directory to /smb/test_data<cyrchar>est, then autofs fails with messages in syslog:
automount[13111]: failed to mount /smb/test_data

Quoted 8 lines

But if I change key in /etc/auto.smb to 7-bit, for example "test_data<cyrchar>est" to "test_datatest":
test_datatest -fstype=smbfs ://test/data<cyrchar>est

and then restart automount, autofs works as it should be.

This problem appears to be in autofs 4.1.3 and autofs 4.1.4_beta1, but not in autofs 3.1.7.

Could you try this patch for me please.

Ian

modules/lookup_file.c renamed from modules/lookup_file.c.char-compare +1 -1
@@ -147,7 +147,7 @@
 				else if (ch == '*') {
 					state = st_star;
 					*(kptr++) = ch;
-				} else if (isprint((char) ch)) {
+				} else if (!iscntrl((char) ch)) {
 					state = st_compare;
 					*(kptr++) = ch;
 				}

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

#3 lore raw

My inline patch looks mangled so here it is as an attachment.

Quoted 39 lines · On Sun, 6 Mar 2005 [email protected] wrote:
Quoted 20 lines · On Thu, 24 Feb 2005, atlantos41 wrote:

Hi.
I start automount with command:
automount --timeout=60 /smb file /etc/auto.smb

where /etc/auto.smb is
test_data<cyrchar>est -fstype=smbfs ://test/data<cyrchar>est

where <cyrchar> is one cyrillic char, for example "�", i. e. ~ echo -n <cyrchar> | hexdump
0000000 00d4
0000001

When I try to change directory to /smb/test_data<cyrchar>est, then autofs fails with messages in syslog:
automount[13111]: failed to mount /smb/test_data

But if I change key in /etc/auto.smb to 7-bit, for example "test_data<cyrchar>est" to "test_datatest":
test_datatest -fstype=smbfs ://test/data<cyrchar>est

Quoted 5 lines

and then restart automount, autofs works as it should be.

This problem appears to be in autofs 4.1.3 and autofs 4.1.4_beta1, but not in
autofs 3.1.7.

Could you try this patch for me please.

Ian

--- autofs-4.1.4_beta2/modules/lookup_file.c.char-compare 2005-03-06
11:06:19.000000000 +0800
+++ autofs-4.1.4_beta2/modules/lookup_file.c 2005-03-06 11:06:57.000000000
+0800

Review line 153

Quoted 8 lines
(quoted diff) +1 -1
@@ -147,7 +147,7 @@
 else if (ch == '*') {
 state = st_star;
 *(kptr++) = ch;
-				} else if (isprint((char) ch)) {
+				} else if (!iscntrl((char) ch)) {
 state = st_compare;
 *(kptr++) = ch;
 }
modules/lookup_file.c renamed from modules/lookup_file.c.char-compare +1 -1
@@ -147,7 +147,7 @@
 				else if (ch == '*') {
 					state = st_star;
 					*(kptr++) = ch;
-				} else if (isprint((char) ch)) {
+				} else if (!iscntrl((char) ch)) {
 					state = st_compare;
 					*(kptr++) = ch;
 				}

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs