Files
erofs-linux/rust/helpers/security.c
T
Alice Ryhl 9c76eaf784 rust: replace lsm context+len with lsm_context
This brings the Rust SecurityCtx abstraction [1] up to date with the new
API where context+len is replaced with an lsm_context [2] struct.

Link: https://lore.kernel.org/r/[email protected] [1]
Link: https://lore.kernel.org/r/[email protected] [2]
Reported-by: Linux Kernel Functional Testing <[email protected]>
Closes: https://lore.kernel.org/r/CA+G9fYv_Y2tzs+uYhMGtfUK9dSYV2mFr6WyKEzJazDsdk9o5zw@mail.gmail.com
Signed-off-by: Alice Ryhl <[email protected]>
[PM: subj line tweak]
Signed-off-by: Paul Moore <[email protected]>
2024-12-04 15:02:29 -05:00

21 lines
436 B
C

// SPDX-License-Identifier: GPL-2.0
#include <linux/security.h>
#ifndef CONFIG_SECURITY
void rust_helper_security_cred_getsecid(const struct cred *c, u32 *secid)
{
security_cred_getsecid(c, secid);
}
int rust_helper_security_secid_to_secctx(u32 secid, struct lsm_context *cp)
{
return security_secid_to_secctx(secid, cp);
}
void rust_helper_security_release_secctx(struct lsm_context *cp)
{
security_release_secctx(cp);
}
#endif