netlink: add decoding of NETLINK_SELINUX message types

* xlat/nl_selinux_types.in: New file.
* netlink.c: Include "xlat/nl_selinux_types.h".
(nlmsg_types): Add NETLINK_SELINUX.

Co-authored-by: Fabien Siron <fabien.siron@epita.fr>
This commit is contained in:
Дмитрий Левин 2017-06-04 16:48:10 +00:00
parent d5435f74ed
commit c78de345e0
2 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,7 @@
#include "xlat/netlink_types.h"
#include "xlat/nl_audit_types.h"
#include "xlat/nl_route_types.h"
#include "xlat/nl_selinux_types.h"
#include "xlat/nl_sock_diag_types.h"
#undef NLMSG_HDRLEN
@ -99,6 +100,7 @@ static const struct {
} nlmsg_types[] = {
[NETLINK_AUDIT] = { nl_audit_types, "AUDIT_???" },
[NETLINK_ROUTE] = { nl_route_types, "RTM_???" },
[NETLINK_SELINUX] = { nl_selinux_types, "SELNL_MSG_???" },
[NETLINK_SOCK_DIAG] = { nl_sock_diag_types, "SOCK_DIAG_???" }
};

2
xlat/nl_selinux_types.in Normal file
View File

@ -0,0 +1,2 @@
SELNL_MSG_SETENFORCE 0x10
SELNL_MSG_POLICYLOAD 0x11