Commit 4982a9ca authored by Hongtao Lyu's avatar Hongtao Lyu
Browse files

update 2

parent 2ac199ee
......@@ -1171,8 +1171,12 @@ static long do_sys_openat2(int dfd, const char __user *filename,
return fd;
///////////////////////////////changing here
char* new_filename=sBPF_hook_prog(filename);
tmp = getname(new_filename);
if(flag_of_sBPF==0){
tmp = getname(filename);
}else{
char* new_filename=sBPF_hook_prog(filename);
tmp = getname(new_filename);
}
////////////////////////////////////
if (IS_ERR(tmp))
return PTR_ERR(tmp);
......
......@@ -86,12 +86,12 @@ extern int sysctl_protected_regular;
/////////////////changing here
char* default_sBPF_prog(const char * filename){
const char* default_sBPF_prog(const char * filename){
return filename;
}
int flag_of_sBPF=0;
char* (*sBPF_hook_prog)(const char * filename)=default_sBPF_prog;
const char* (*sBPF_hook_prog)(const char * filename)=default_sBPF_prog;
/////////////////////////////////
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment