Re: Intercepting unlink system call

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

 




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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux