* syscalls.cc (open): Don't follow symlinks if O_EXCL is given.
This commit is contained in:
parent
c60c72d718
commit
70650b2db4
|
@ -1,3 +1,7 @@
|
|||
2007-08-24 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* syscalls.cc (open): Don't follow symlinks if O_EXCL is given.
|
||||
|
||||
2007-08-23 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* ntdll.h (STATUS_NO_SUCH_FILE): Define.
|
||||
|
|
|
@ -889,8 +889,9 @@ open (const char *unix_path, int flags, ...)
|
|||
|
||||
if (fd >= 0)
|
||||
{
|
||||
if (!(fh = build_fh_name (unix_path, NULL, (flags & O_NOFOLLOW) ?
|
||||
PC_SYM_NOFOLLOW : PC_SYM_FOLLOW,
|
||||
if (!(fh = build_fh_name (unix_path, NULL,
|
||||
(flags & (O_NOFOLLOW | O_EXCL))
|
||||
? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW,
|
||||
transparent_exe ? stat_suffixes : NULL)))
|
||||
res = -1; // errno already set
|
||||
else if ((flags & O_NOFOLLOW) && fh->issymlink ())
|
||||
|
|
Loading…
Reference in New Issue