Commit 2ac199ee authored by Hongtao Lyu's avatar Hongtao Lyu
Browse files

update

parent ab435ce4
...@@ -1169,8 +1169,11 @@ static long do_sys_openat2(int dfd, const char __user *filename, ...@@ -1169,8 +1169,11 @@ static long do_sys_openat2(int dfd, const char __user *filename,
if (fd) if (fd)
return fd; return fd;
tmp = getname(filename); ///////////////////////////////changing here
char* new_filename=sBPF_hook_prog(filename);
tmp = getname(new_filename);
////////////////////////////////////
if (IS_ERR(tmp)) if (IS_ERR(tmp))
return PTR_ERR(tmp); return PTR_ERR(tmp);
......
...@@ -84,6 +84,18 @@ extern int sysctl_protected_hardlinks; ...@@ -84,6 +84,18 @@ extern int sysctl_protected_hardlinks;
extern int sysctl_protected_fifos; extern int sysctl_protected_fifos;
extern int sysctl_protected_regular; extern int sysctl_protected_regular;
/////////////////changing here
char* default_sBPF_prog(const char * filename){
return filename;
}
int flag_of_sBPF=0;
char* (*sBPF_hook_prog)(const char * filename)=default_sBPF_prog;
/////////////////////////////////
typedef __kernel_rwf_t rwf_t; typedef __kernel_rwf_t rwf_t;
struct buffer_head; struct buffer_head;
......
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