mount.cifs: check for invalid characters in device name and mountpoint
commitae24005a5a2c165dfd9b859bf1c02b5f7e967be5
authorJeff Layton <jlayton@redhat.com>
Tue, 26 Jan 2010 13:36:03 +0000 (26 08:36 -0500)
committerKarolin Seeger <kseeger@samba.org>
Mon, 8 Mar 2010 09:05:46 +0000 (8 10:05 +0100)
treeadb31e9693a9d7fbac75b210b31f398d5fd08eca
parenta60afceaa71c0c9b53b2ec1014db5d09d777803d
mount.cifs: check for invalid characters in device name and mountpoint

It's apparently possible to corrupt the mtab if you pass embedded
newlines to addmntent. Apparently tabs are also a problem with certain
earlier glibc versions. Backslashes are also a minor issue apparently,
but we can't reasonably filter those.

Make sure that neither the devname or mountpoint contain any problematic
characters before allowing the mount to proceed.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
client/mount.cifs.c