summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto/getentropy_linux.c
diff options
context:
space:
mode:
authorderaadt <>2014-07-12 14:46:31 +0000
committerderaadt <>2014-07-12 14:46:31 +0000
commit0678a82d0afa040fc29a7b54fce55185c72a1bad (patch)
treedf2ae70d8da6845d262d438b160d269de3539e8e /src/lib/libcrypto/crypto/getentropy_linux.c
parent0b572b36cd1a45a713c9eef52318dcae68872a88 (diff)
downloadopenbsd-0678a82d0afa040fc29a7b54fce55185c72a1bad.tar.gz
openbsd-0678a82d0afa040fc29a7b54fce55185c72a1bad.tar.bz2
openbsd-0678a82d0afa040fc29a7b54fce55185c72a1bad.zip
remove gratuitous differences, ok beck bcook
Diffstat (limited to 'src/lib/libcrypto/crypto/getentropy_linux.c')
-rw-r--r--src/lib/libcrypto/crypto/getentropy_linux.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/crypto/getentropy_linux.c b/src/lib/libcrypto/crypto/getentropy_linux.c
index 3fd30316d2..f1320d24d5 100644
--- a/src/lib/libcrypto/crypto/getentropy_linux.c
+++ b/src/lib/libcrypto/crypto/getentropy_linux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getentropy_linux.c,v 1.18 2014/07/08 09:38:55 beck Exp $ */ 1/* $OpenBSD: getentropy_linux.c,v 1.19 2014/07/12 14:46:31 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> 4 * Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org>
@@ -141,8 +141,8 @@ getentropy(void *buf, size_t len)
141 * sysctl ABI, or consider providing a new failsafe API which 141 * sysctl ABI, or consider providing a new failsafe API which
142 * works in a chroot or when file descriptors are exhausted. 142 * works in a chroot or when file descriptors are exhausted.
143 */ 143 */
144#undef FAIL_HARD_WHEN_LINUX_DEPRECATES_SYSCTL 144#undef FAIL_INSTEAD_OF_TRYING_FALLBACK
145#ifdef FAIL_HARD_WHEN_LINUX_DEPRECATES_SYSCTL 145#ifdef FAIL_INSTEAD_OF_TRYING_FALLBACK
146 raise(SIGKILL); 146 raise(SIGKILL);
147#endif 147#endif
148 ret = getentropy_fallback(buf, len); 148 ret = getentropy_fallback(buf, len);
@@ -179,12 +179,12 @@ getentropy_urandom(void *buf, size_t len)
179 179
180start: 180start:
181 181
182 flags = O_RDONLY; 182 flags = O_RDONLY;
183#ifdef O_NOFOLLOW 183#ifdef O_NOFOLLOW
184 flags |= O_NOFOLLOW; 184 flags |= O_NOFOLLOW;
185#endif 185#endif
186#ifdef O_CLOEXEC 186#ifdef O_CLOEXEC
187 flags |= O_CLOEXEC; 187 flags |= O_CLOEXEC;
188#endif 188#endif
189 fd = open("/dev/urandom", flags, 0); 189 fd = open("/dev/urandom", flags, 0);
190 if (fd == -1) { 190 if (fd == -1) {