On 29-sep-08, at 19:06, Gunnar Wolf wrote: > Gunnar Wolf dijo [Mon, Sep 29, 2008 at 11:58:20AM -0500]: >>> Isn't this flawed by a race condition (stat-before-open)? There is >>> a O_NOFOLLOW (at least on FreeBSD [1] and Linux [2]) flag to open(2) >>> for this "do not open a symlink" scenario. >> >> Yes, I noticed the race condition, but was unable to provide for >> anything better. NOFOLLOW looks much better - Do you know if it is >> supported on any other OSs (at least, OSs which provide symlink >> semantics). Another course of action can be the lstat-fopen-fstat >> [1], >> which seems more universal (although a bit uglier as well) > > Umh, it seems it has not yet been adopted at least in Solaris - At > least not in Solaris 9, which is the only release I have currently > access to.
There were introduced in Solaris 10: http://blogs.sun.com/jjj/entry/opensolaris_security_potpourri -- Octality http://www.octality.com/ _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
