diff options
author | Dave Reisner | 2011-12-26 23:10:22 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-02 13:59:35 +0100 |
commit | 14f66ad69a02ce5c39a92f1b27384f63507934a4 (patch) | |
tree | 704624a725b13f6db2d8c9c67e49fcab239cfcbc /libmount/src/fs.c | |
parent | fdisk: use CDROM_GET_CAPABILITY ioctl (diff) | |
download | kernel-qcow2-util-linux-14f66ad69a02ce5c39a92f1b27384f63507934a4.tar.gz kernel-qcow2-util-linux-14f66ad69a02ce5c39a92f1b27384f63507934a4.tar.xz kernel-qcow2-util-linux-14f66ad69a02ce5c39a92f1b27384f63507934a4.zip |
libmount: always trust the source of a pseudofs
Since nodev FSs have no backing block device, it's unreasonable to try
and resolve the source back to a path on the filesystem. Always trust
the source of the FS given in /etc/fstab to avoid remounting the device
when a directory of the same name exists in the current working
directory.
Example reproduction:
# mkdir /foo
# echo 'foo /foo tmpfs defaults 0 0' >> /etc/fstab
# mount -a
# cd /root; mkdir foo
# mount -a
# mount | grep /foo
foo on /foo type tmpfs (rw,relatime)
/root/foo on /foo type tmpfs (rw,relatime)
[kzak@redhat.com: - use fs->flags to detect pseudo FS]
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/fs.c')
0 files changed, 0 insertions, 0 deletions