Thread (11 messages) 11 messages, 4 authors, 2023-12-08

Re: [PATCH 3/4] listmount: small changes in semantics

From: Miklos Szeredi <miklos@szeredi.hu>
Date: 2023-12-06 20:24:58
Also in: linux-fsdevel, linux-man, linux-security-module

On Wed, 6 Dec 2023 at 20:58, Serge E. Hallyn [off-list ref] wrote:
On Tue, Nov 28, 2023 at 05:03:34PM +0100, Miklos Szeredi wrote:
quoted
-     if (!is_path_reachable(m, mnt->mnt_root, &rootmnt))
-             return capable(CAP_SYS_ADMIN) ? 0 : -EPERM;
+     if (!capable(CAP_SYS_ADMIN) &&
Was there a reason to do the capable check first?  In general,
checking capable() when not needed is frowned upon, as it will
set the PF_SUPERPRIV flag.
I synchronized the permission checking with statmount() without
thinking about the order.   I guess we can change the order back in
both syscalls?

I also don't understand the reason behind the using the _noaudit()
variant.  Christian?

Thanks,
Miklos
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help