]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cifs: Mangle string used for unc in /proc/mounts
authorSachin Prabhu <sprabhu@redhat.com>
Thu, 13 Sep 2012 16:48:57 +0000 (17:48 +0100)
committerSteve French <sfrench@us.ibm.com>
Sat, 15 Sep 2012 20:51:32 +0000 (15:51 -0500)
commit5a5e9cb61129f19ba28e124a925d8d27d75ea6ed
tree8f31843ddc302c76dc02b1e4547abd7a997fe5c4
parentd9883bc4d75a70d0bf971b7745e5ad59d28fba87
cifs: Mangle string used for unc in /proc/mounts

The string for "unc=" in /proc/mounts needs to be escaped. The current
behaviour can create problems in cases when mounting a share starting
with a number.

example:
>mount -t cifs -o username=test,password=x vm140-31:/17000-test /mnt
>mount -o remount,password=x /mnt
mount error: could not resolve address for vm140-31x00-test: Unknown
error

The sub-string "\170" which is part of the unc for the mount above in
/proc/mounts is interpreted as character'x' in the case above. Escaping
the string fixes the problem.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsfs.c