Skip to contentSkip to conversation

new syscall: flink

PATCH Clayton Weaver 2 participants 2 messages Apr 10, 2003 – Apr 11, 2003

lore
Share & tools
lore
#0 lore raw

One other thing: why O_CANLINK (suggested flag
to open) instead of O_NOLINK?

It seems to me that for the vast majority of
open()calls, you don't care whether the open
fd can be flink()ed to, because you don't pass
the file descriptor to an untrusted process.

A bit set to eliminate that capability is
the new feature one might need for security reasons with an implemented flink() call available to programmers.

Seems like leaving "can be linked to" as the default setting and having an explicit flag to prevent that would be more efficient.

Regards,

Clayton Weaver
<mailto: [email protected]>

Signature · 3 lines
_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup
#1 lore raw
Quoted 2 lines · Clayton Weaver

One other thing: why O_CANLINK (suggested flag
to open) instead of O_NOLINK?

Because O_CANLINK fails secure; O_NOLINK fails open. When security is on the line, you really want a fail-safe solution.

And the failure mode of forgetting to specify an O_NOLINK flag where it should have been specified is going to be a common one.