LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1020|回复: 1

如何截获用户对文件的操作(新建,删除,修改)?

[复制链接]
发表于 2007-12-4 15:05:52 | 显示全部楼层 |阅读模式
有没有方法获取用户的文件操作?不仅仅是用shell对文件的操作,也有能是通过API编程实现的对文件的操作,也有可能是FTP,NFS,对文件的操作!
发表于 2007-12-12 20:16:14 | 显示全部楼层
我提供个clue阿
zlibc就是实现了你说的这种方式,它是用重写了系统的某些函数,然后指定所有的文件打开的操作都先调用它的实现方法。
主要是这个东西:LD_PRELOAD

see the following statement:

This package overrides the "open" function (and other similar system call functions) of the C library. this package uses the LD_PRELOAD variable to redirect the dynamic linker to use the relevant functions of uncompress.o instead of the shared library.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表