aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2013-03-29 02:18:49 +0800
committerLAN-TW <lantw44@gmail.com>2013-03-29 02:18:49 +0800
commitc5d5d4f4e04734a1a746c87f5800fae6bd524405 (patch)
tree9943658ca92cee45d3da4243e7061414a6bf631c
parentc7e86b610f0e2b2ff4f7606cc46a8d15990cb5f1 (diff)
downloadtaiwan-online-judge-lantw44-c5d5d4f4e04734a1a746c87f5800fae6bd524405.tar.gz
taiwan-online-judge-lantw44-c5d5d4f4e04734a1a746c87f5800fae6bd524405.tar.zst
taiwan-online-judge-lantw44-c5d5d4f4e04734a1a746c87f5800fae6bd524405.zip
Update to Linux kernel 3.8
-rw-r--r--toj/center/src/judgk_security.c12
-rw-r--r--toj/center/src/judgk_security.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/toj/center/src/judgk_security.c b/toj/center/src/judgk_security.c
index 8eb54cb..ce0b207 100644
--- a/toj/center/src/judgk_security.c
+++ b/toj/center/src/judgk_security.c
@@ -180,7 +180,7 @@ int judgk_security_hook(){
hook_sops.secmark_refcount_dec = hook_secmark_refcount_dec;
hook_sops.req_classify_flow = hook_req_classify_flow;
hook_sops.tun_dev_create = hook_tun_dev_create;
- hook_sops.tun_dev_post_create = hook_tun_dev_post_create;
+ //hook_sops.tun_dev_post_create = hook_tun_dev_post_create;
hook_sops.tun_dev_attach = hook_tun_dev_attach;
hook_sops.key_alloc = hook_key_alloc;
hook_sops.key_free = hook_key_free;
@@ -321,7 +321,7 @@ static int hook_file_open(struct file *file, const struct cred *cred){
int i;
struct judgk_proc_info *info;
- char *buf_path
+ char *buf_path;
char *path;
info = judgk_proc_task_lookup(current);
@@ -2450,7 +2450,7 @@ static int hook_tun_dev_create(){
security_hook_rf(info);
return -EACCES;
}
-static void hook_tun_dev_post_create(struct sock *sk){
+/*static void hook_tun_dev_post_create(struct sock *sk){
struct judgk_proc_info *info;
info = judgk_proc_task_lookup(current);
@@ -2461,13 +2461,13 @@ static void hook_tun_dev_post_create(struct sock *sk){
pr_alert("judgk:PID %d tun_dev_post_create\n",current->tgid);
security_hook_rf(info);
-}
-static int hook_tun_dev_attach(struct sock *sk){
+}*/
+static int hook_tun_dev_attach(struct sock *sk, void* security){
struct judgk_proc_info *info;
info = judgk_proc_task_lookup(current);
if(likely(info == NULL || in_interrupt())){
- return ori_sops->tun_dev_attach(sk);
+ return ori_sops->tun_dev_attach(sk, security);
}
pr_alert("judgk:PID %d tun_dev_attach\n",current->tgid);
diff --git a/toj/center/src/judgk_security.h b/toj/center/src/judgk_security.h
index 61a2808..50e128a 100644
--- a/toj/center/src/judgk_security.h
+++ b/toj/center/src/judgk_security.h
@@ -176,8 +176,8 @@ static void hook_secmark_refcount_inc(void);
static void hook_secmark_refcount_dec(void);
static void hook_req_classify_flow(const struct request_sock *req,struct flowi *fl);
static int hook_tun_dev_create(void);
-static void hook_tun_dev_post_create(struct sock *sk);
-static int hook_tun_dev_attach(struct sock *sk);
+/*static void hook_tun_dev_post_create(struct sock *sk);*/
+static int hook_tun_dev_attach(struct sock *sk, void* security);
/*static int hook_xfrm_policy_alloc_security(struct xfrm_sec_ctx **ctxp,struct xfrm_user_sec_ctx *sec_ctx);
static int hook_xfrm_policy_clone_security(struct xfrm_sec_ctx *old_ctx,struct xfrm_sec_ctx **new_ctx);
static void hook_xfrm_policy_free_security(struct xfrm_sec_ctx *ctx);