mount.cifs: check for invalid characters in device name and mountpoint
commita065c177dfc8f968775593ba00dffafeebb2e054
authorJeff Layton <jlayton@redhat.com>
Tue, 26 Jan 2010 13:15:41 +0000 (26 08:15 -0500)
committerJeff Layton <jlayton@redhat.com>
Tue, 26 Jan 2010 13:15:41 +0000 (26 08:15 -0500)
treefcc1ace9adbe0e3e379b07e2f20ca952699048f8
parent3ae5dac462c4ed0fb2cd94553583c56fce2f9d80
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