Permalink
Browse files

Fix mmap regression in EL5

In older kernels, the file_mmap portion of security_operations just pointed to
file_mmap_addr, and wasn't actually used in very many places (they all made a
direct call to file_mmap_addr). So, define a macro to use file_mmap_addr
instead of file_mmap, which fixes the broken mmap security check for TPE on
EL5.
  • Loading branch information...
cormander committed May 25, 2012
1 parent 3bbd8ca commit 59f6376a16375872d87b4360def62e80555f5197
Showing with 5 additions and 0 deletions.
  1. +5 −0 security.c
View
@@ -266,6 +266,11 @@ static inline void set_addr_ro(unsigned long addr, bool flag) {
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
// in old kernels, file_mmap calls file_mmap_addr, so focus on that one instead
#define file_mmap file_mmap_addr
#endif
void hijack_syscalls(void) {
int ret;

0 comments on commit 59f6376

Please sign in to comment.