Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH] device arguments from lookup)
Quoted 2 lines · Alexander Viro
Folks, before you get all excited about cramming side effects into open(2), consider ...
I agree completely.
Quoted 2 lines
A lot of stuff relies on the fact that
close(open(foo, O_RDONLY))is a no-op. Breaking that assumption is a Bad Thing(tm).
Also here I would like to agree. Unfortunately this is false. Opening device files often has interesting side effects.
Andries
Quoted 5 lines · On Sat, 19 May 2001 [email protected] wrote:
Quoted 2 lines
A lot of stuff relies on the fact that
close(open(foo, O_RDONLY))is a no-op. Breaking that assumption is a Bad Thing(tm).Also here I would like to agree. Unfortunately this is false. Opening device files often has interesting side effects.
Too bad. They can be triggered by similar races between attacker changing the type of object (file<->symlink) and backup.