Avoid false positives in MS-DOS detection by also looking for autoexec.bat. Closes...
authorJoey Hess <joey@kitenet.net>
Mon, 12 Mar 2012 15:31:07 +0000 (11:31 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 12 Mar 2012 15:37:35 +0000 (11:37 -0400)
commit29c404f72b3357e621c1c63f033dfd82bef5a43c
tree56d4478e69d479343fe96aa9d70574c69856536b
parentff291cf9969325392e1b9fbac9673b72793aca5e
Avoid false positives in MS-DOS detection by also looking for autoexec.bat. Closes: #663540

/dos is not an unheard of directory to have on a linux system -- we used
to put our dual-boot mount point there in 1995 -- and when mounted by
grub-mount, the filesystem type is not available to limit detection of
MS-DOS to only relevant filesystems.

Work around this problem by also requiring an /autoexec.bat or a
/config.sys. While not all MS-DOS systems have one of these files,
any MS-DOS system that a user is likely to care about showing up
in their boot menu probably does.
(IIRC not all MS-DOS systems even have a /dos!)

I also took a brief look at the other tests that allows fuse mount through.
Many of them, like 83haiku check for enough different items that the
chances of a false positive are very low even absent a filesystem type
confirmation. The most worrying are 20macosx, which only checks for
/mach_kernel, and 30utility, which only checks for /f11.sys.

Those should probably be tightened down, or a way found to check the actual
filesystem type when using grub-mount.
debian/changelog
os-probes/mounted/x86/20microsoft