Debian Codegraph @

rust/helpers/security.c

raw
1 // SPDX-License-Identifier: GPL-2.0
2
3 #include <linux/security.h>
4
5 #ifndef CONFIG_SECURITY
6 __rust_helper void rust_helper_security_cred_getsecid(const struct cred *c,
7 u32 *secid)
8 {
9 security_cred_getsecid(c, secid);
10 }
11
12 __rust_helper int rust_helper_security_secid_to_secctx(u32 secid,
13 struct lsm_context *cp)
14 {
15 return security_secid_to_secctx(secid, cp);
16 }
17
18 __rust_helper void rust_helper_security_release_secctx(struct lsm_context *cp)
19 {
20 security_release_secctx(cp);
21 }
22
23 __rust_helper int
24 rust_helper_security_binder_set_context_mgr(const struct cred *mgr)
25 {
26 return security_binder_set_context_mgr(mgr);
27 }
28
29 __rust_helper int
30 rust_helper_security_binder_transaction(const struct cred *from,
31 const struct cred *to)
32 {
33 return security_binder_transaction(from, to);
34 }
35
36 __rust_helper int
37 rust_helper_security_binder_transfer_binder(const struct cred *from,
38 const struct cred *to)
39 {
40 return security_binder_transfer_binder(from, to);
41 }
42
43 __rust_helper int rust_helper_security_binder_transfer_file(
44 const struct cred *from, const struct cred *to, const struct file *file)
45 {
46 return security_binder_transfer_file(from, to, file);
47 }
48 #endif