Manfred Spraul wrote:
> Can you call F_REOPEN multiple times, or only once after
> open(O_DEFEROPEN)?
>
> If F_REOPEN should support multiple calls, then we need a filp specific
> callback:
> The FIFO code must send wake-ups when a filp is promoted from O_RDONLY
> to O_RDWR, and it doesn't support O_NONE (fifo_open fails, potential
> races in pipe_poll).
I think increasing permission could lead to security holes. When you
pass an O_RDONLY descriptor to another process, you don't expect it to
be able to gain write access to the file. Especially if you did the
open/unlink thing. So promoting O_RDONLY to O_RDWR is out.
Perhaps it should do something like open(/proc/self/fd/N). What does
that do with fifos?
-- Jamie