Messages in this thread | | | Date | Mon, 22 Apr 2024 23:18:52 +0300 | Subject | Re: [PATCH 2/2] openat2: add OA2_INHERIT_CRED flag | From | stsp <> |
| |
22.04.2024 22:53, Stefan Metzmacher пишет: > I'm wondering if it would be better to capture the whole cred structure. > > Similar to io_register_personality(), which uses get_current_cred(). > > Only using uid and gid, won't reflect any group memberships or > capabilities... Hmm, I thought about that, but was under an impression that with get_current_cred() you only increment a refcount. But I guess the trick here is that due to an RCU machinery, you can actually get your local copy if someone else changes it?
I'll try what you say, thanks.
| |