]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cifs: Mangle string used for unc in /proc/mounts
authorSachin Prabhu <sprabhu@redhat.com>
Wed, 19 Sep 2012 13:22:45 +0000 (06:22 -0700)
committerJeff Layton <jlayton@redhat.com>
Wed, 19 Sep 2012 13:22:45 +0000 (06:22 -0700)
commit7ce3843f4c59f1a62dc0632324c60bf2ff581256
treef1dbd0a504d5b1aaedab219d2302c92f08a204ee
parent9e5e4e815e8b74cbb7afbf97cd7a37bae06677bf
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