security.c 1.1 KB

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