mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
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]>
21 lines
436 B
C
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
|