diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 5dee88362e71..5aa45b168122 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -3296,6 +3296,11 @@ static int selinux_kernel_create_files_as(struct cred *new, struct inode *inode) | |||
3296 | return 0; | 3296 | return 0; |
3297 | } | 3297 | } |
3298 | 3298 | ||
3299 | static int selinux_kernel_module_request(void) | ||
3300 | { | ||
3301 | return task_has_system(current, SYSTEM__MODULE_REQUEST); | ||
3302 | } | ||
3303 | |||
3299 | static int selinux_task_setpgid(struct task_struct *p, pid_t pgid) | 3304 | static int selinux_task_setpgid(struct task_struct *p, pid_t pgid) |
3300 | { | 3305 | { |
3301 | return current_has_perm(p, PROCESS__SETPGID); | 3306 | return current_has_perm(p, PROCESS__SETPGID); |
@@ -5404,6 +5409,7 @@ static struct security_operations selinux_ops = { | |||
5404 | .cred_prepare = selinux_cred_prepare, | 5409 | .cred_prepare = selinux_cred_prepare, |
5405 | .kernel_act_as = selinux_kernel_act_as, | 5410 | .kernel_act_as = selinux_kernel_act_as, |
5406 | .kernel_create_files_as = selinux_kernel_create_files_as, | 5411 | .kernel_create_files_as = selinux_kernel_create_files_as, |
5412 | .kernel_module_request = selinux_kernel_module_request, | ||
5407 | .task_setpgid = selinux_task_setpgid, | 5413 | .task_setpgid = selinux_task_setpgid, |
5408 | .task_getpgid = selinux_task_getpgid, | 5414 | .task_getpgid = selinux_task_getpgid, |
5409 | .task_getsid = selinux_task_getsid, | 5415 | .task_getsid = selinux_task_getsid, |