aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/selinuxfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/selinuxfs.c')
-rw-r--r--security/selinux/selinuxfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 298e695d6822..3a6e8731646c 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -174,7 +174,7 @@ static ssize_t sel_write_enforce(struct file *file, const char __user *buf,
174 audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS, 174 audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS,
175 "enforcing=%d old_enforcing=%d auid=%u ses=%u", 175 "enforcing=%d old_enforcing=%d auid=%u ses=%u",
176 new_value, selinux_enforcing, 176 new_value, selinux_enforcing,
177 audit_get_loginuid(current), 177 from_kuid(&init_user_ns, audit_get_loginuid(current)),
178 audit_get_sessionid(current)); 178 audit_get_sessionid(current));
179 selinux_enforcing = new_value; 179 selinux_enforcing = new_value;
180 if (selinux_enforcing) 180 if (selinux_enforcing)
@@ -305,7 +305,7 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,
305 goto out; 305 goto out;
306 audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS, 306 audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_STATUS,
307 "selinux=0 auid=%u ses=%u", 307 "selinux=0 auid=%u ses=%u",
308 audit_get_loginuid(current), 308 from_kuid(&init_user_ns, audit_get_loginuid(current)),
309 audit_get_sessionid(current)); 309 audit_get_sessionid(current));
310 } 310 }
311 311
@@ -485,7 +485,7 @@ static int sel_mmap_policy(struct file *filp, struct vm_area_struct *vma)
485 return -EACCES; 485 return -EACCES;
486 } 486 }
487 487
488 vma->vm_flags |= VM_RESERVED; 488 vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
489 vma->vm_ops = &sel_mmap_policy_ops; 489 vma->vm_ops = &sel_mmap_policy_ops;
490 490
491 return 0; 491 return 0;
@@ -551,7 +551,7 @@ static ssize_t sel_write_load(struct file *file, const char __user *buf,
551out1: 551out1:
552 audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_POLICY_LOAD, 552 audit_log(current->audit_context, GFP_KERNEL, AUDIT_MAC_POLICY_LOAD,
553 "policy loaded auid=%u ses=%u", 553 "policy loaded auid=%u ses=%u",
554 audit_get_loginuid(current), 554 from_kuid(&init_user_ns, audit_get_loginuid(current)),
555 audit_get_sessionid(current)); 555 audit_get_sessionid(current));
556out: 556out:
557 mutex_unlock(&sel_mutex); 557 mutex_unlock(&sel_mutex);