Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/security/selinux/initcalls.c
38179 views
1
// SPDX-License-Identifier: GPL-2.0-only
2
/*
3
* SELinux initcalls
4
*/
5
6
#include <linux/init.h>
7
8
#include "initcalls.h"
9
10
/**
11
* selinux_initcall - Perform the SELinux initcalls
12
*
13
* Used as a device initcall in the SELinux LSM definition.
14
*/
15
int __init selinux_initcall(void)
16
{
17
int rc = 0, rc_tmp = 0;
18
19
rc_tmp = init_sel_fs();
20
if (!rc && rc_tmp)
21
rc = rc_tmp;
22
23
rc_tmp = sel_netport_init();
24
if (!rc && rc_tmp)
25
rc = rc_tmp;
26
27
rc_tmp = sel_netnode_init();
28
if (!rc && rc_tmp)
29
rc = rc_tmp;
30
31
rc_tmp = sel_netif_init();
32
if (!rc && rc_tmp)
33
rc = rc_tmp;
34
35
rc_tmp = sel_netlink_init();
36
if (!rc && rc_tmp)
37
rc = rc_tmp;
38
39
#if defined(CONFIG_SECURITY_INFINIBAND)
40
rc_tmp = sel_ib_pkey_init();
41
if (!rc && rc_tmp)
42
rc = rc_tmp;
43
#endif
44
45
#if defined(CONFIG_NETFILTER)
46
rc_tmp = selinux_nf_ip_init();
47
if (!rc && rc_tmp)
48
rc = rc_tmp;
49
#endif
50
51
return rc;
52
}
53
54