diff options
author | Alice Ryhl <aliceryhl@google.com> | 2024-11-01 09:56:20 +0000 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2024-12-04 15:02:29 -0500 |
commit | 9c76eaf784886603a010f0af7071c2b4d7f574c5 (patch) | |
tree | 20ee87e96ce61b96a65d849edde1a9e053dba739 /rust/helpers/security.c | |
parent | a4626e978677e3d3e816fdc217d8416c8b9462ae (diff) | |
download | linux-stable-9c76eaf784886603a010f0af7071c2b4d7f574c5.tar.gz linux-stable-9c76eaf784886603a010f0af7071c2b4d7f574c5.tar.bz2 linux-stable-9c76eaf784886603a010f0af7071c2b4d7f574c5.zip |
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/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>
Diffstat (limited to 'rust/helpers/security.c')
-rw-r--r-- | rust/helpers/security.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/helpers/security.c b/rust/helpers/security.c index 239e5b4745fe..0c4c2065df28 100644 --- a/rust/helpers/security.c +++ b/rust/helpers/security.c @@ -8,13 +8,13 @@ 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, char **secdata, u32 *seclen) +int rust_helper_security_secid_to_secctx(u32 secid, struct lsm_context *cp) { - return security_secid_to_secctx(secid, secdata, seclen); + return security_secid_to_secctx(secid, cp); } -void rust_helper_security_release_secctx(char *secdata, u32 seclen) +void rust_helper_security_release_secctx(struct lsm_context *cp) { - security_release_secctx(secdata, seclen); + security_release_secctx(cp); } #endif |