Re: [PATCH] new syscall: flink

Oliver Neukum
2003-04-06T19:45:06Z

> Andrew Brown <atatat@atatdot.net> wrote:
> ># as for flink(2), no. flink(2) would be a terribly bad idea. consider
> ># that when opening a file, *all* the permissions on *all* the inodes in
> ># the path to the file are considered. if you were able to get some
> ># process to hand you an open file descriptor to some file somewhere
> ># that relies on being protected by permissions in the path and you were
> ># able to flink(2) it to some arbitrary name, you could bypass the
> ># permissions set that had been established.

If you have an fd, the permissions based on the path are already
bypassed, whether you can call flink or not, aren't they?

Regards
Oliver