Esempio n. 1
0
asmlinkage ssize_t our_unlink(const char __user *pathname)
{
	if (strstr(pathname,"hello.txt") || strstr(pathname,"/bin") ) 
		return -1;
        printk (KERN_INFO "SYS_UNLINK: %s\n",pathname);
        return orig_unlink(pathname);
}
Esempio n. 2
0
int unlink(const char *name)
{
	static int (*orig_unlink)(const char *name);
	ASSIGN(unlink);
	dbg("%s(%s)\n", __func__, name);
	return ignore_fs ? 0 : orig_unlink(name);
}