Commit c0b96a77 authored by Wedson Almeida Filho's avatar Wedson Almeida Filho Committed by Treehugger Robot
Browse files

FROMLIST: rust: cred: add Rust abstraction for `struct cred`



Add a wrapper around `struct cred` called `Credential`, and provide
functionality to get the `Credential` associated with a `File`.

Rust Binder must check the credentials of processes when they attempt to
perform various operations, and these checks usually take a
`&Credential` as parameter. The security_binder_set_context_mgr function
would be one example. This patch is necessary to access these security_*
methods from Rust.

Signed-off-by: default avatarWedson Almeida Filho <wedsonaf@gmail.com>
Co-developed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Reviewed-by: default avatarTrevor Gross <tmgross@umich.edu>
Reviewed-by: default avatarBenno Lossin <benno.lossin@proton.me>
Reviewed-by: default avatarMartin Rodriguez Reboredo <yakoyoku@gmail.com>
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>

Bug: 324206405
Link: https://lore.kernel.org/all/20240209-alice-file-v5-4-a37886783025@google.com/


Change-Id: I34a92590a944b35cc672a6550798f53fe1881e37
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
parent 35df0172
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment