Remove hooking of init module: it should really go in an LSM proper; also fix Makefile when SMAP is not specified

This commit is contained in:
Sean Williams 2014-12-06 12:47:59 -08:00
parent c979656cc9
commit cd5bedbb0e
2 changed files with 9 additions and 10 deletions

View File

@ -21,7 +21,7 @@ else
endif
ifdef HIDE_ME
OPTS += -D_HIDE_ME
OPTS += -DHIDE_ME
camb-objs += hide.o
endif
@ -29,18 +29,18 @@ all:
ifndef SMAP
ifndef TEXT_SEGMENT_START
@echo "Missing parameter: TEXT_SEGMENT_START"
@exit 1
@echo "Missing parameter: TEXT_SEGMENT_START"
@exit 1
endif
ifndef TEXT_SEGMENT_END
@echo "Missing parameter: TEXT_SEGMENT_END"
@exit 1
@echo "Missing parameter: TEXT_SEGMENT_END"
@exit 1
endif
ifndef SYSCALL_BASE_ADDR
@echo "Missing parameter: SYSCALL_BASE_ADDR"
@exit 1
@echo "Missing parameter: SYSCALL_BASE_ADDR"
@exit 1
endif
endif

View File

@ -19,7 +19,7 @@
#include "sysfs.h"
#include "hash.h"
#ifdef _HIDE_ME
#ifdef HIDE_ME
#include "hide.h"
#endif
@ -28,7 +28,6 @@ char *module_str = "camb";
static unsigned long **syscall_table = (unsigned long **) SYSCALL_BASE_ADDR;
static unsigned long *syscall_table_copy[NR_syscalls];
int (*orig_init_module)(void *, unsigned long, const char *);
/* Allow writes to executable memory pages */
void en_mem_wr(void) {
@ -69,7 +68,7 @@ static int __init camb_init(void) {
}
/* Hide the fact that we're monitoring the system for tampering */
#ifdef _HIDE_ME
#ifdef HIDE_ME
hide_me();
#endif