[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intercepting unlink system call




asmlinkage long  our_sys_unlink(const char *filename )
{
 printk("File is about to get deleted " );
/* print a message when a file is to be deleted*/
 printk("%s",filename);
 return original_call(filename);
/* call the function at orignal address to remove the file*/
}

Terminate printk string with "\n" and Check.


--
Ashok S

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/