From: TJ S. <tj...@ca...> - 2003-05-21 18:11:57
|
tj>hasse>I can verify this behaviour on Solaris too. The opened file tj>hasse>will never be considered to be a symlink. tj> tj>Looks like this happens because open(2) follows a symlink -- and there's tj>no lopen(2) system call. What a bloody mess. Linux adopted FreeBSD's tj>O_NOFOLLOW extension, but Solaris doesn't have that open() flag. And tj>without that, there'll be a race condition. Hrm. It seems Solaris has the following esoteric way for not following symlinks: If path is a symbolic link and O_CREAT and O_EXCL are set, the link is not followed. However, using both O_CREAT and O_EXCL on a path that is _not_ a symlink will cause the open() call to fail -- which is not the desired behavior either. TJ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What is a barrier, an obstacle, but an opportunity for proceeding in a slighty different direction? -TJ Saunders ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |