lkml.org 
[lkml]   [2024]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH v2 0/2] implement OA2_INHERIT_CRED flag for openat2()
Date
This patch-set implements the OA2_INHERIT_CRED flag for openat2() syscall.
It is needed to perform an open operation with the creds that were in
effect when the dir_fd was opened. This allows the process to pre-open
some dirs and switch eUID (and other UIDs/GIDs) to the less-privileged
user, while still retaining the possibility to open/create files within
the pre-opened directory set.

Changes in v2:
- capture full struct cred instead of just fsuid/fsgid.
Suggested by Stefan Metzmacher <metze@samba.org>


Stas Sergeev (2):
fs: reorganize path_openat()
openat2: add OA2_INHERIT_CRED flag

fs/internal.h | 2 +-
fs/namei.c | 52 +++++++++++++++++++++++++++++-------
fs/open.c | 2 +-
include/linux/fcntl.h | 2 ++
include/uapi/linux/openat2.h | 3 +++
5 files changed, 50 insertions(+), 11 deletions(-)

--
2.44.0


\
 
 \ /
  Last update: 2024-05-27 17:58    [W:0.022 / U:3.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site