Re: [take 3] Use pid in inotify events.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Evgeniy Polyakov
Date: Wednesday, November 19, 2008 - 7:53 am

Hi Michael.

On Wed, Nov 19, 2008 at 09:34:46AM -0500, Michael Kerrisk (mtk.manpages@googlemail.com) wrote:

So far the only real need is a pid. That will solve the cases I'm
working on and it may be interesting for other applications. It is
possible to extend read/write IO with offset and size parameters though.

Do you see any other possible extensions?


Um, hmm... Permission is _always_ denied for 'alien' IO, as it was
pointed by Robert, at init time there is no way to know, will there be
alien IO (i.e. originated by the process with different uid) or not.
More on this: inotify initialization is just a memory allocation in
the kernel, nothing more.

We can argue about object insertion into inotify queue though. But
again, we check already that it has read permissions, and if so, we are
allowed to receive notificatons about IO against given target, since if
new code will return for whatever reason -EPERM, people will use old
code.

So, putting PID/whatever else into event can be flag-driven, but there
is no way to return EPERM anywhere in the call chain not breaking
backward compatibility of the whole idea.

-- 
	Evgeniy Polyakov
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [take 3] Use pid in inotify events., Evgeniy Polyakov, (Wed Nov 19, 7:53 am)
Re: [take 3] Use pid in inotify events., John McCutchan, (Thu Nov 20, 3:34 pm)
Re: [take 3] Use pid in inotify events., Evgeniy Polyakov, (Thu Nov 20, 4:06 pm)
Re: [take 3] Use pid in inotify events., Arnd Bergmann, (Fri Nov 21, 11:39 am)
Re: [take 3] Use pid in inotify events., David Newall, (Sat Nov 22, 12:12 am)
Re: [take 3] Use pid in inotify events., Evgeniy Polyakov, (Sat Nov 22, 2:37 am)
Re: [take 3] Use pid in inotify events., Evgeniy Polyakov, (Sat Nov 22, 2:41 am)
Re: [take 3] Use pid in inotify events., David Newall, (Sat Nov 22, 4:41 am)
Re: [take 3] Use pid in inotify events., John McCutchan, (Sun Nov 23, 10:08 pm)
Re: [take 3] Use pid in inotify events., Evgeniy Polyakov, (Mon Nov 24, 12:30 am)