summaryrefslogtreecommitdiff
path: root/libc/sysdeps/mach
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2010-06-10 19:17:37 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2010-06-10 19:17:37 +0000
commitcfd3e7c77b6bc0fae1f579fec477086e0d358662 (patch)
tree4748a08cef2f4fd92c8531d9db37fae19ed82a78 /libc/sysdeps/mach
parentd37f23fb2b1487d48bbcf8d6d934f965cb9a621e (diff)
downloadeglibc2-cfd3e7c77b6bc0fae1f579fec477086e0d358662.tar.gz
Merge changes between r10503 and r10687 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@10688 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/mach')
-rw-r--r--libc/sysdeps/mach/hurd/linkat.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/sysdeps/mach/hurd/linkat.c b/libc/sysdeps/mach/hurd/linkat.c
index 1942144e0..062d913e3 100644
--- a/libc/sysdeps/mach/hurd/linkat.c
+++ b/libc/sysdeps/mach/hurd/linkat.c
@@ -1,5 +1,5 @@
/* Make a link between file names relative to open directories. Hurd version.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006,2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,9 @@ linkat (fromfd, from, tofd, to, flags)
file_t oldfile, linknode, todir;
char *toname;
- oldfile = __file_name_lookup_at (fromfd, flags, from, 0, 0);
+ /* POSIX says linkat doesn't follow symlinks by default, so pass
+ O_NOLINK. That can be overridden by AT_SYMLINK_FOLLOW in FLAGS. */
+ oldfile = __file_name_lookup_at (fromfd, flags, from, O_NOLINK, 0);
if (oldfile == MACH_PORT_NULL)
return -1;