]> git.ipfire.org Git - thirdparty/util-linux.git/commit
Libmount: Fix removal of "owner" option when executed as root
authorKarel Zak <kzak@redhat.com>
Mon, 24 Feb 2025 13:04:53 +0000 (14:04 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 25 Feb 2025 07:32:26 +0000 (08:32 +0100)
commit55f47128bce18c40873ecd520a650a4c93b9eed7
treed91d0fbeacda9187cbf040e88c471e45d1296e92
parentc69353a5e03779b4840f260ba52a7d2bb7b8943c
Libmount: Fix removal of "owner" option when executed as root

When executed as root, libmount replaces the "owner" and "group" mount
options with "nosuid, nodev, ..." However, this can result in an
"invalid argument" error because libmount removes the unwanted options
first and then tries to address the location for the new options using
the already removed options. To fix this, we need to reverse the order
of operations.

Reported-by: hxinzhe <hxinzhe1024@163.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 4aa39b894dbb80eab45af53a011224a43b687b94)
libmount/src/context_mount.c