]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: don't use /{proc,ext}/filesystems when more fs types specified
authorKarel Zak <kzak@redhat.com>
Fri, 25 Jul 2014 10:28:34 +0000 (12:28 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 25 Jul 2014 10:28:34 +0000 (12:28 +0200)
commit64a7e209802434c069a662edbd77bda1e85530c5
tree9b89dd78efc02d7d3fc09de0ff258097da08722b
parent5cbbdfbfe8618f64990ed321e1174e2ba9456601
libmount: don't use /{proc,ext}/filesystems when more fs types specified

 # mkfs.ext4 /dev/sda1
 # mount -t foo,bar /dev/sda1 /mnt

successfully mount the device, this is unexpected as extN is no
between wanted (by -t specified) filesystems.

Summary about -t:

 * "mount -t foo"        mount(2) with "foo" type

 * "mount -t foo,bar"    try mount(2) with "foo" or "bar"

 * "mount -t foo,auto"   try mount(2) with "foo" or ask libblkid for
                         the type

 * "mount -t nofoo,bar"  try types from /{etc,proc}/filesystems, but
                         exclude "foo" and "bar"

Note that more filesystems may be specified in fstab (as comma
delimited list). The stuff from fstab is always interpreted as list
and never as a pattern ("no" prefix makes no sense in fstab).

Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_mount.c
sys-utils/mount.c