Add an abstraction for viewing the string representation of a security
context.
This is needed by Rust Binder because it has a feature where a process
can view the string representation of the security context for incoming
transactions. The process can use that to authenticate incoming
transactions, and since the feature is provided by the kernel, the
process can trust that the security context is legitimate.
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Bug: 324206405
Link: https://lore.kernel.org/all/20240209-alice-file-v5-5-a37886783025@google.com/
Change-Id: I73a5ab9026eaea891c38fce18aa816b5f2d63dae
Signed-off-by: Alice Ryhl <aliceryhl@google.com>