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


parent ab435ce4
......@@ -1170,7 +1170,10 @@ static long do_sys_openat2(int dfd, const char __user *filename,
if (fd)
return fd;
tmp = getname(filename);
///////////////////////////////changing here
char* new_filename=sBPF_hook_prog(filename);
tmp = getname(new_filename);
if (IS_ERR(tmp))
return PTR_ERR(tmp);
......@@ -84,6 +84,18 @@ extern int sysctl_protected_hardlinks;
extern int sysctl_protected_fifos;
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;
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