mount.cifs: check for invalid characters in device name and mountpoint
commit42f5c0ad79c1122e1fef2875f2e0a277bf86e97b
authorJeff Layton <jlayton@redhat.com>
Tue, 26 Jan 2010 13:45:58 +0000 (26 08:45 -0500)
committerKarolin Seeger <kseeger@samba.org>
Thu, 6 May 2010 12:14:22 +0000 (6 14:14 +0200)
tree88a3b86b4cf32578c251f87e552eaec154a1acf8
parentd650c6369212851fc9c780c8f800184f48abc348
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>
(cherry picked from commit 5532a5d5cf7cec0bb758a80e9ee74b5807088661)
source3/client/mount.cifs.c