mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
9c76eaf784
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/20240915-alice-file-v10-5-88484f7a3dcf@google.com [1] Link: https://lore.kernel.org/r/20241023212158.18718-3-casey@schaufler-ca.com [2] Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> Closes: https://lore.kernel.org/r/CA+G9fYv_Y2tzs+uYhMGtfUK9dSYV2mFr6WyKEzJazDsdk9o5zw@mail.gmail.com Signed-off-by: Alice Ryhl <aliceryhl@google.com> [PM: subj line tweak] Signed-off-by: Paul Moore <paul@paul-moore.com>
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
|