diff options
author | Alexandre Oliva <lxoliva@fsfla.org> | 2010-08-12 06:50:17 +0000 |
---|---|---|
committer | Alexandre Oliva <lxoliva@fsfla.org> | 2010-08-12 06:50:17 +0000 |
commit | 0a75377b9e3d9478a3abd8e9da27f7bfb2acca03 (patch) | |
tree | 4e5ccd05279ea4d4b97954615d77d5eec0fea381 /freed-ora/current/f14/linux-2.6-sparc-selinux-mprotect-checks.patch | |
parent | b755c61c708a261992df5a8c565e4750ef5da2f1 (diff) | |
download | linux-libre-raptor-0a75377b9e3d9478a3abd8e9da27f7bfb2acca03.tar.gz linux-libre-raptor-0a75377b9e3d9478a3abd8e9da27f7bfb2acca03.zip |
2.6.35-3.fc14
Diffstat (limited to 'freed-ora/current/f14/linux-2.6-sparc-selinux-mprotect-checks.patch')
-rw-r--r-- | freed-ora/current/f14/linux-2.6-sparc-selinux-mprotect-checks.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/freed-ora/current/f14/linux-2.6-sparc-selinux-mprotect-checks.patch b/freed-ora/current/f14/linux-2.6-sparc-selinux-mprotect-checks.patch new file mode 100644 index 000000000..cc821e323 --- /dev/null +++ b/freed-ora/current/f14/linux-2.6-sparc-selinux-mprotect-checks.patch @@ -0,0 +1,35 @@ +diff -up linux-2.6.24.sparc64/security/selinux/hooks.c.BAD linux-2.6.24.sparc64/security/selinux/hooks.c +--- linux-2.6.24.sparc64/security/selinux/hooks.c.BAD 2008-03-21 14:28:06.000000000 -0400 ++++ linux-2.6.24.sparc64/security/selinux/hooks.c 2008-03-21 14:29:10.000000000 -0400 +@@ -3018,6 +3018,7 @@ static int file_map_prot_check(struct fi + const struct cred *cred = current_cred(); + int rc = 0; + ++#ifndef CONFIG_SPARC + if ((prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) { + /* + * We are making executable an anonymous mapping or a +@@ -3028,6 +3029,7 @@ static int file_map_prot_check(struct fi + if (rc) + goto error; + } ++#endif + + if (file) { + /* read access is always possible with a mapping */ +@@ -3081,6 +3081,7 @@ static int selinux_file_mprotect(struct + if (selinux_checkreqprot) + prot = reqprot; + ++#ifndef CONFIG_SPARC + if ((prot & PROT_EXEC) && !(vma->vm_flags & VM_EXEC)) { + rc = 0; + if (vma->vm_start >= vma->vm_mm->start_brk && +@@ -3103,6 +3103,7 @@ static int selinux_file_mprotect(struct + if (rc) + return rc; + } ++#endif + + return file_map_prot_check(vma->vm_file, prot, vma->vm_flags&VM_SHARED); + } |