1*94d356c0SAlice Ryhl // SPDX-License-Identifier: GPL-2.0 2*94d356c0SAlice Ryhl 3*94d356c0SAlice Ryhl #include <linux/security.h> 4*94d356c0SAlice Ryhl 5*94d356c0SAlice Ryhl #ifndef CONFIG_SECURITY 6*94d356c0SAlice Ryhl void rust_helper_security_cred_getsecid(const struct cred *c, u32 *secid) 7*94d356c0SAlice Ryhl { 8*94d356c0SAlice Ryhl security_cred_getsecid(c, secid); 9*94d356c0SAlice Ryhl } 10*94d356c0SAlice Ryhl 11*94d356c0SAlice Ryhl int rust_helper_security_secid_to_secctx(u32 secid, char **secdata, u32 *seclen) 12*94d356c0SAlice Ryhl { 13*94d356c0SAlice Ryhl return security_secid_to_secctx(secid, secdata, seclen); 14*94d356c0SAlice Ryhl } 15*94d356c0SAlice Ryhl 16*94d356c0SAlice Ryhl void rust_helper_security_release_secctx(char *secdata, u32 seclen) 17*94d356c0SAlice Ryhl { 18*94d356c0SAlice Ryhl security_release_secctx(secdata, seclen); 19*94d356c0SAlice Ryhl } 20*94d356c0SAlice Ryhl #endif 21