Ensure that whatever we pass as -t to mount(8) is in a whitelist
IOW, ensure that you can't pass e.g. 'nfs../blah' to load the whole NFS
stack. Now we error out, like this
$ udisksctl mount --block-device /dev/sdc3 -t nfs../blah
Error mounting /dev/sdc3: GDBus.Error:org.freedesktop.UDisks2.Error.OptionNotPermitted: Requested filesystem type `nfs../blah' is neither well-known nor in /proc/filesystems nor in /etc/filesystems
This is a bug that was already fixed for udisks 1.x, see
https://bugs.freedesktop.org/show_bug.cgi?id=32232
CVE-2010-4661: Arbitrary kernel module load
But we apparently forgot to fix this in the move from udisks 1.x to
2.x. Pointed out by Sebastian Krahmer <krahmer@suse.de>, thanks!
Signed-off-by: David Zeuthen <davidz@redhat.com>