netlink.c (01f534d0ae9d7b3ad4dcd943d53418731da82ea7) netlink.c (a31f2d17b331db970259e875b7223d3aba7e3821)
1/*
2 * Netlink event notifications for SELinux.
3 *
4 * Author: James Morris <jmorris@redhat.com>
5 *
6 * Copyright (C) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 97 unchanged lines hidden (view full) ---

106
107void selnl_notify_policyload(u32 seqno)
108{
109 selnl_notify(SELNL_MSG_POLICYLOAD, &seqno);
110}
111
112static int __init selnl_init(void)
113{
1/*
2 * Netlink event notifications for SELinux.
3 *
4 * Author: James Morris <jmorris@redhat.com>
5 *
6 * Copyright (C) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
7 *
8 * This program is free software; you can redistribute it and/or modify

--- 97 unchanged lines hidden (view full) ---

106
107void selnl_notify_policyload(u32 seqno)
108{
109 selnl_notify(SELNL_MSG_POLICYLOAD, &seqno);
110}
111
112static int __init selnl_init(void)
113{
114 struct netlink_kernel_cfg cfg = {
115 .groups = SELNLGRP_MAX,
116 };
117
114 selnl = netlink_kernel_create(&init_net, NETLINK_SELINUX,
118 selnl = netlink_kernel_create(&init_net, NETLINK_SELINUX,
115 SELNLGRP_MAX, NULL, NULL, THIS_MODULE);
119 THIS_MODULE, &cfg);
116 if (selnl == NULL)
117 panic("SELinux: Cannot create netlink socket.");
118 netlink_set_nonroot(NETLINK_SELINUX, NL_NONROOT_RECV);
119 return 0;
120}
121
122__initcall(selnl_init);
120 if (selnl == NULL)
121 panic("SELinux: Cannot create netlink socket.");
122 netlink_set_nonroot(NETLINK_SELINUX, NL_NONROOT_RECV);
123 return 0;
124}
125
126__initcall(selnl_init);