]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: fix MS_REMOUNT emulation by mount_setattr()
authorKarel Zak <kzak@redhat.com>
Thu, 23 Mar 2023 14:25:00 +0000 (15:25 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Mar 2023 14:25:00 +0000 (15:25 +0100)
commitfee1ddebfc5b84d26add58eb00a304520207ed2e
treedbf5c67f77879e0b9ec2086713d804331060af53
parented96995bd7c1433627d02dfd30a411e6a0e56d1f
libmount: fix MS_REMOUNT emulation by mount_setattr()

The classic mount(MS_REMOUNT) means that all unspecified MS_NOxxx
flags are remove (except MS_NOATIME). We need to follow this semantic
when emulate remount by mount_setattr(), because "mount -o remount /"
is the way how (for example) systemd resets root filesystem to default
(e.g. ro->rw, etc.)

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=2180593
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/hook_mount.c
libmount/src/optlist.c