![]() | |||||||||||||
Messages in this thread |
On Wed, Oct 21, 1998 at 12:42:47AM +0100, Alan Cox wrote: > To wear a linus impersonator hat > O_NOFOLLOW is the generic solution to that and a pile of other link handling > problems O_CREAT|O_EXCL won't follow links - so we can create core that way, and not dump if it fails. I've also got a three liner to implement O_NOFOLLOW that may or may not work (kernel being recompiled now). It seemed to trivial to implement, so I'm not sure its `correct': open_namei uses a macro lookup_flags(x) to generate a lookup condition based upon the open flags - if O_CREAT|O_EXCL are both set, we don't follow links. So, adding O_NOFOLLOW to asm/fcntl.h and changing this macro to reflect this, we get O_NOFOLLOW semantics for free (well, one instruction, maybe two). -cw - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/ | ||||||||||||
| Last update: 2005-03-22 13:45 [from the cache] ©2003-2008 | |||||||||||||