* [PATCH v4 6/9] fs: use new capable_any functionality
[not found] <20230511142535.732324-1-cgzones@googlemail.com>
@ 2023-05-11 14:25 ` Christian Göttsche
2023-05-15 7:56 ` Christian Brauner
0 siblings, 1 reply; 2+ messages in thread
From: Christian Göttsche @ 2023-05-11 14:25 UTC (permalink / raw)
To: selinux; +Cc: Alexander Viro, Christian Brauner, linux-fsdevel, linux-kernel,
bpf
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@googlemail.com>
---
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 ceb17d2dfa19..05c64494d37b 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_any(CAP_SYS_RESOURCE, CAP_SYS_ADMIN);
}
struct pipe_inode_info *alloc_pipe_info(void)
--
2.40.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v4 6/9] fs: use new capable_any functionality
2023-05-11 14:25 ` [PATCH v4 6/9] fs: use new capable_any functionality Christian Göttsche
@ 2023-05-15 7:56 ` Christian Brauner
0 siblings, 0 replies; 2+ messages in thread
From: Christian Brauner @ 2023-05-15 7:56 UTC (permalink / raw)
To: Christian Göttsche
Cc: selinux, Alexander Viro, linux-fsdevel, linux-kernel, bpf
On Thu, May 11, 2023 at 04:25:29PM +0200, Christian Göttsche wrote:
> 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@googlemail.com>
> ---
Acked-by: Christian Brauner <brauner@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-15 7:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230511142535.732324-1-cgzones@googlemail.com>
2023-05-11 14:25 ` [PATCH v4 6/9] fs: use new capable_any functionality Christian Göttsche
2023-05-15 7:56 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).