selinux_netlink.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * Netlink event notifications for SELinux.
  4. *
  5. * Author: James Morris <[email protected]>
  6. *
  7. * Copyright (C) 2004 Red Hat, Inc., James Morris <[email protected]>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2,
  11. * as published by the Free Software Foundation.
  12. */
  13. #ifndef _LINUX_SELINUX_NETLINK_H
  14. #define _LINUX_SELINUX_NETLINK_H
  15. #include <linux/types.h>
  16. /* Message types. */
  17. #define SELNL_MSG_BASE 0x10
  18. enum {
  19. SELNL_MSG_SETENFORCE = SELNL_MSG_BASE,
  20. SELNL_MSG_POLICYLOAD,
  21. SELNL_MSG_MAX
  22. };
  23. #ifndef __KERNEL__
  24. /* Multicast groups - backwards compatiblility for userspace */
  25. #define SELNL_GRP_NONE 0x00000000
  26. #define SELNL_GRP_AVC 0x00000001 /* AVC notifications */
  27. #define SELNL_GRP_ALL 0xffffffff
  28. #endif
  29. enum selinux_nlgroups {
  30. SELNLGRP_NONE,
  31. #define SELNLGRP_NONE SELNLGRP_NONE
  32. SELNLGRP_AVC,
  33. #define SELNLGRP_AVC SELNLGRP_AVC
  34. __SELNLGRP_MAX
  35. };
  36. #define SELNLGRP_MAX (__SELNLGRP_MAX - 1)
  37. /* Message structures */
  38. struct selnl_msg_setenforce {
  39. __s32 val;
  40. };
  41. struct selnl_msg_policyload {
  42. __u32 seqno;
  43. };
  44. #endif /* _LINUX_SELINUX_NETLINK_H */