summaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 2b5ee5fbd652..a8bf324130f5 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -4073,6 +4073,20 @@ static int selinux_kernel_read_file(struct file *file,
4073 return rc; 4073 return rc;
4074} 4074}
4075 4075
4076static int selinux_kernel_load_data(enum kernel_load_data_id id)
4077{
4078 int rc = 0;
4079
4080 switch (id) {
4081 case LOADING_MODULE:
4082 rc = selinux_kernel_module_from_file(NULL);
4083 default:
4084 break;
4085 }
4086
4087 return rc;
4088}
4089
4076static int selinux_task_setpgid(struct task_struct *p, pid_t pgid) 4090static int selinux_task_setpgid(struct task_struct *p, pid_t pgid)
4077{ 4091{
4078 return avc_has_perm(&selinux_state, 4092 return avc_has_perm(&selinux_state,
@@ -6972,6 +6986,7 @@ static struct security_hook_list selinux_hooks[] __lsm_ro_after_init = {
6972 LSM_HOOK_INIT(kernel_act_as, selinux_kernel_act_as), 6986 LSM_HOOK_INIT(kernel_act_as, selinux_kernel_act_as),
6973 LSM_HOOK_INIT(kernel_create_files_as, selinux_kernel_create_files_as), 6987 LSM_HOOK_INIT(kernel_create_files_as, selinux_kernel_create_files_as),
6974 LSM_HOOK_INIT(kernel_module_request, selinux_kernel_module_request), 6988 LSM_HOOK_INIT(kernel_module_request, selinux_kernel_module_request),
6989 LSM_HOOK_INIT(kernel_load_data, selinux_kernel_load_data),
6975 LSM_HOOK_INIT(kernel_read_file, selinux_kernel_read_file), 6990 LSM_HOOK_INIT(kernel_read_file, selinux_kernel_read_file),
6976 LSM_HOOK_INIT(task_setpgid, selinux_task_setpgid), 6991 LSM_HOOK_INIT(task_setpgid, selinux_task_setpgid),
6977 LSM_HOOK_INIT(task_getpgid, selinux_task_getpgid), 6992 LSM_HOOK_INIT(task_getpgid, selinux_task_getpgid),