Automounting of smb shares with dollar sign

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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, 
 
-- 
Regards,
Yury Krivopalov
--- modules/parse_sun.c.orig	2016-06-30 12:25:24.303171405 +0300
+++ modules/parse_sun.c	2016-06-30 12:27:17.269833151 +0300
@@ -177,13 +177,10 @@
 			}
 			break;
 
 		case '\\':
 			len++;
-			if (dst)
-				*dst++ = ch;
-
 			if (*src) {
 				len++;
 				if (dst)
 					*dst++ = *src;
 				src++;

[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux