`
iunknown
  • 浏览: 404078 次
社区版块
存档分类
最新评论

linux inotify 通知信息不包括 user 和 process 的原因

阅读更多
http://groups.google.com/group/linux.kernel/browse_thread/thread/3e45bbe4ae4fce5b/d745471e60cd7656?hl=en&#d745471e60cd7656

在这里 Robert Love 说明了为什么不提供 user 和 process 信息的原因:

引用

Hi, Chris.

> On a newsgroup someone was using inotify, but was asking if there was
> any way to also determine which process/user had caused the notification.

> Is this something that would make sense (as an optional bit of
> information) in inotify?

It is definitely something that could be added, technically speaking.

I have been hesitant, though.  I do not want feature creep to be a
deterrent to acceptance into the Linux kernel.  I also think that there
could be arguments about security.  Sending the event is one thing,
telling which pid (and thus what user, etc.) caused the event is
another.  For example, we can make the argument that read rights on a
file are tantamount to the right to receive a read event.  But can we
say that read rights are enough for a unprivileged user to know that
root at pid 820 is writing the file?  I don't know.

I'd add it if there were consensus.  I don't know that it makes sense,
though.

        Robert Love
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics