Automounting of smb shares with dollar sign
Hello,
I found a problem, that started to reproduce on my new environment (archlinux), before that I used Debian Wheezy and everything worked fine. The point is that I can't automount smb shares with dollar sign (Ex.: //hostname/C$).
It happend because two facts:
1. Autofs reads '$' as a special symbol
2. mount.cifs reads '\\' as a delimiter
So in my case if I returns "//hostname/C$" from auto.smb, then automount daemon replace '$' to '' and if I returns "//hostname/C\\$" then mount.cifs crops "\\$" and uses '$' as a prefixpath mount option.
I attached simple fix for autofs-5.1.2, that drops back slash after arguments parsing. It works in my case,
Signature · 2 lines
Regards, Yury Krivopalov
parse_sun.c renamed from parse_sun.c.orig +0 -3
@@ -177,13 +177,10 @@ }break ;case '\\' : len++; -if (dst) - *dst++ = ch; -if (*src) { len++;if (dst) *dst++ = *src; src++;
Ian Kent
maintainerQuoted 6 lines · Yury Krivopalov
Hello,
I found a problem, that started to reproduce on my new environment (archlinux), before that I used Debian Wheezy and everything worked fine. The point is that I can't automount smb shares with dollar sign (Ex.:
//hostname/C$).
Quoted 7 lines
It happend because two facts:
1. Autofs reads '$' as a special symbol
2. mount.cifs reads '\\' as a delimiterSo in my case if I returns "//hostname/C$" from auto.smb, then automount daemon replace '$' to '' and if I returns "//hostname/C\\$" then mount.cifs crops "\\$" and uses '$' as a prefixpath mount option.
Escaping of cifs mount entries has been a long standing problem over and over again.
Mostly fixes seem to always to have bad side effects, dropping them of trying to fix them often results in the problems returning.
I'll have a look at this and try and work out if it would have side effects for other than cifs mounts.
Quoted 4 lines
I attached simple fix for autofs-5.1.2, that drops back slash after arguments parsing. It works in my case,
Thanks for our patch.
Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
Ian Kent
maintainerQuoted 18 lines · Ian Kent
Quoted 6 lines · Yury Krivopalov
Hello,
I found a problem, that started to reproduce on my new environment (archlinux), before that I used Debian Wheezy and everything worked fine. The point is that I can't automount smb shares with dollar sign (Ex.:
//hostname/C$).Quoted 7 lines
It happend because two facts:
1. Autofs reads '$' as a special symbol
2. mount.cifs reads '\\' as a delimiterSo in my case if I returns "//hostname/C$" from auto.smb, then automount daemon replace '$' to '' and if I returns "//hostname/C\\$" then mount.cifs crops "\\$" and uses '$' as a prefixpath mount option.
Escaping of cifs mount entries has been a long standing problem over and over again.
Quoted 12 lines
Mostly fixes seem to always to have bad side effects, dropping them of trying to
fix them often results in the problems returning.I'll have a look at this and try and work out if it would have side effects for
other than cifs mounts.Quoted 4 lines
I attached simple fix for autofs-5.1.2, that drops back slash after arguments
parsing. It works in my case,
Actually, now I look closer, this might be a bug in expandsunent().
The expandsunent() function is called before parsing the map entry not after so changing this could have unexpected side effects.
I'll run parser tests with this change and see what happens, when I get a chance.
Quoted 6 lines
Quoted 1 line
Thanks for our patch.
Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
--
To unsubscribe from this list: send the line "unsubscribe autofs" in