about summary refs log tree commit diff
path: root/csu
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-04-13 21:28:18 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-04-13 21:28:18 +0200
commita12ae89f860229cbe5ba91f1f9cf17cc5a9ede31 (patch)
tree3b22b435b0081a1f52f68db25d66b253d0b71337 /csu
parent44500cbb25bc6e76723304b9ff39f875c04309f9 (diff)
downloadglibc-a12ae89f860229cbe5ba91f1f9cf17cc5a9ede31.tar.gz
glibc-a12ae89f860229cbe5ba91f1f9cf17cc5a9ede31.tar.xz
glibc-a12ae89f860229cbe5ba91f1f9cf17cc5a9ede31.zip
Assume that O_NOFOLLOW is always defined
Diffstat (limited to 'csu')
-rw-r--r--csu/check_fds.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/csu/check_fds.c b/csu/check_fds.c
index bec2a5372c..062c879373 100644
--- a/csu/check_fds.c
+++ b/csu/check_fds.c
@@ -87,14 +87,10 @@ check_one_fd (int fd, int mode)
 void
 __libc_check_standard_fds (void)
 {
-  /* This is really paranoid but some people actually are.  If /dev/null
-     should happen to be a symlink to somewhere else and not the device
-     commonly known as "/dev/null" we bail out.  We can detect this with
-     the O_NOFOLLOW flag for open() but only on some system.  */
-#ifndef O_NOFOLLOW
-# define O_NOFOLLOW	0
-#endif
-  /* Check all three standard file descriptors.  */
+  /* Check all three standard file descriptors.  The O_NOFOLLOW flag
+     is really paranoid but some people actually are.  If /dev/null
+     should happen to be a symlink to somewhere else and not the
+     device commonly known as "/dev/null" we bail out.  */
   check_one_fd (STDIN_FILENO, O_WRONLY | O_NOFOLLOW);
   check_one_fd (STDOUT_FILENO, O_RDONLY | O_NOFOLLOW);
   check_one_fd (STDERR_FILENO, O_RDONLY | O_NOFOLLOW);