[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240315113828.258005-6-cgzones@googlemail.com>
Date: Fri, 15 Mar 2024 12:37:27 +0100
From: Christian Göttsche <cgzones@...glemail.com>
To: linux-security-module@...r.kernel.org
Cc: Christian Brauner <brauner@...nel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.cz>,
linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
bpf@...r.kernel.org
Subject: [PATCH 06/10] fs: use new capable_any functionality
Use the new added capable_any function in appropriate cases, where a
task is required to have any of two capabilities.
Signed-off-by: Christian Göttsche <cgzones@...glemail.com>
Acked-by: Christian Brauner <brauner@...nel.org>
---
v3:
rename to capable_any()
---
fs/pipe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pipe.c b/fs/pipe.c
index 50c8a8596b52..9d02698ed5d4 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -784,7 +784,7 @@ bool too_many_pipe_buffers_hard(unsigned long user_bufs)
bool pipe_is_unprivileged_user(void)
{
- return !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN);
+ return !capable_any(CAP_SYS_RESOURCE, CAP_SYS_ADMIN);
}
struct pipe_inode_info *alloc_pipe_info(void)
--
2.43.0
Powered by blists - more mailing lists