diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-05-15 09:40:30 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-05-15 09:40:30 -0400 |
commit | 05f399e63428b5129ca54f9edefbf2876f82b75c (patch) | |
tree | 30008ed6560d57337b5bee8a802ce72346aca6e7 | |
parent | 10a52685af7f060284232ce5b9c5935ca2f5c25e (diff) | |
download | glibc-05f399e63428b5129ca54f9edefbf2876f82b75c.tar.gz glibc-05f399e63428b5129ca54f9edefbf2876f82b75c.tar.xz glibc-05f399e63428b5129ca54f9edefbf2876f82b75c.zip |
Use non-cancelable interfaces in setup code
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/dl-osinfo.h | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index f9ab6dbb1b..ed1754db23 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-05-15 Ulrich Drepper <drepper@gmail.com> + * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard): + Use non-cancelable interfaces. + [BZ #9809] * locale/iso-639.def: Add entry for Sorani. diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h index df07869bc5..ffe5d586b5 100644 --- a/sysdeps/unix/sysv/linux/dl-osinfo.h +++ b/sysdeps/unix/sysv/linux/dl-osinfo.h @@ -1,5 +1,5 @@ /* Operating system specific code for generic dynamic loader functions. Linux. - Copyright (C) 2000-2002,2004-2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2000-2002,2004-2009,2011 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 @@ -21,6 +21,7 @@ #include <dl-sysdep.h> #include <fcntl.h> #include <stdint.h> +#include <not-cancel.h> #ifndef MIN # define MIN(a,b) (((a)<(b))?(a):(b)) @@ -67,11 +68,11 @@ _dl_setup_stack_chk_guard (void *dl_random) if (__builtin_expect (dl_random == NULL, 0)) { # ifdef ENABLE_STACKGUARD_RANDOMIZE - int fd = __open ("/dev/urandom", O_RDONLY); + int fd = open_not_cancel_2 ("/dev/urandom", O_RDONLY); if (fd >= 0) { - ssize_t reslen = __read (fd, &ret, sizeof (ret)); - __close (fd); + ssize_t reslen = read_not_cancel (fd, &ret, sizeof (ret)); + close_not_cancel_no_status (fd); if (reslen == (ssize_t) sizeof (ret)) return ret; } |