intercepting file system system calls

后端 未结 4 585
轮回少年
轮回少年 2021-02-08 09:58

I am writing an application for which I need to intercept some filesystem system calls eg. unlink. I would like to save some file say abc. If user deletes the file then I need t

4条回答
  •  走了就别回头了
    2021-02-08 11:02

    You can watch unlink events with inotify, though this might happen too late for your purposes (I don't know because I don't know your purposes, and you should experiment to find out). The in-kernel alternatives based on LSM (by which I mean SMACK, TOMOYO and friends) are really for Mandatory Access Control so may not be suitable for your purposes.

提交回复
热议问题