summaryrefslogtreecommitdiffstats
path: root/security/selinux/ss
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-10-13 17:50:31 -0400
committerJames Morris <jmorris@namei.org>2010-10-21 10:12:59 +1100
commit845ca30fe9691f1bab7cfbf30b6d11c944eb4abd (patch)
treeeabf2b17957c2214375f870387eaab6c43d9e931 /security/selinux/ss
parentcee74f47a6baba0ac457e87687fdcf0abd599f0a (diff)
downloadlinux-845ca30fe9691f1bab7cfbf30b6d11c944eb4abd.tar.gz
linux-845ca30fe9691f1bab7cfbf30b6d11c944eb4abd.tar.bz2
linux-845ca30fe9691f1bab7cfbf30b6d11c944eb4abd.zip
selinux: implement mmap on /selinux/policy
/selinux/policy allows a user to copy the policy back out of the kernel. This patch allows userspace to actually mmap that file and use it directly. Signed-off-by: Eric Paris <eparis@redhat.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss')
-rw-r--r--security/selinux/ss/services.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index 7565d16aac31..3a1739b33b78 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -3169,7 +3169,7 @@ int security_read_policy(void **data, ssize_t *len)
*len = security_policydb_len();
- *data = vmalloc(*len);
+ *data = vmalloc_user(*len);
if (!*data)
return -ENOMEM;