]> 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>
Mon, 24 Feb 2025 13:04:53 +0000 (14:04 +0100)
commit4aa39b894dbb80eab45af53a011224a43b687b94
treea1286730e609d8030631db3dc1da770d05a05112
parent3564de4d10aa0f4b51ab8b7d8b5fa268fa770720
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>
libmount/src/context_mount.c