diff mbox series

[v2,5/8] fs: use new capable_or functionality

Message ID 20220502160030.131168-4-cgzones@googlemail.com (mailing list archive)
State Superseded
Delegated to: Paul Moore
Headers show
Series [v2,1/8] capability: add capable_or to test for multiple caps with exactly one audit message | expand

Commit Message

Christian Göttsche May 2, 2022, 4 p.m. UTC
Use the new added capable_or function in appropriate cases, where a task
is required to have any of two capabilities.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
 fs/pipe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/fs/pipe.c b/fs/pipe.c
index 9648ac15164a..d91a2bdc837d 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -776,7 +776,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_or(CAP_SYS_RESOURCE, CAP_SYS_ADMIN);
 struct pipe_inode_info *alloc_pipe_info(void)