Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
0002 /*
0003  * Netlink event notifications for SELinux.
0004  *
0005  * Author: James Morris <jmorris@redhat.com>
0006  *
0007  * Copyright (C) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
0008  *
0009  * This program is free software; you can redistribute it and/or modify
0010  * it under the terms of the GNU General Public License version 2,
0011  * as published by the Free Software Foundation.
0012  */
0013 #ifndef _LINUX_SELINUX_NETLINK_H
0014 #define _LINUX_SELINUX_NETLINK_H
0015 
0016 #include <linux/types.h>
0017 
0018 /* Message types. */
0019 #define SELNL_MSG_BASE 0x10
0020 enum {
0021     SELNL_MSG_SETENFORCE = SELNL_MSG_BASE,
0022     SELNL_MSG_POLICYLOAD,
0023     SELNL_MSG_MAX
0024 };
0025 
0026 #ifndef __KERNEL__
0027 /* Multicast groups - backwards compatiblility for userspace */
0028 #define SELNL_GRP_NONE      0x00000000
0029 #define SELNL_GRP_AVC       0x00000001  /* AVC notifications */
0030 #define SELNL_GRP_ALL       0xffffffff
0031 #endif
0032 
0033 enum selinux_nlgroups {
0034     SELNLGRP_NONE,
0035 #define SELNLGRP_NONE   SELNLGRP_NONE
0036     SELNLGRP_AVC,
0037 #define SELNLGRP_AVC    SELNLGRP_AVC
0038     __SELNLGRP_MAX
0039 };
0040 #define SELNLGRP_MAX    (__SELNLGRP_MAX - 1)
0041 
0042 /* Message structures */
0043 struct selnl_msg_setenforce {
0044     __s32       val;
0045 };
0046 
0047 struct selnl_msg_policyload {
0048     __u32   seqno;
0049 };
0050 
0051 #endif /* _LINUX_SELINUX_NETLINK_H */