]> err.no Git - util-linux/commit
mount: check for unsuccessful read-only bind mounts
authorKarel Zak <kzak@redhat.com>
Thu, 19 Nov 2009 14:56:12 +0000 (15:56 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 19 Nov 2009 14:56:12 +0000 (15:56 +0100)
commitb7ce600d3d238ca3e82aa04ee6845afc45fb5eb8
tree51dfc1626d479471b02f8b018d1e8f2619bd140c
parent75c1d2aee67c3adfab4d653fd1f2459f20f34e98
mount: check for unsuccessful read-only bind mounts

Linux kernel allows to use MS_RDONLY together with MS_BIND,
unfortunately the MS_RDONLY is silently ignored and the target
mountpoint is still read-write. Then we have 'ro' in mtab and 'rw' in
/proc/mounts.

This patch checks for this situation by access(2) or futimens(2)
(change atime) and mtab is properly updated and user informed.

Reported-by: Terry Burton <tez@terryburton.co.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac
mount/mount.c