summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/arc4random/getentropy_aix.c
diff options
context:
space:
mode:
authorderaadt <>2021-10-24 21:24:20 +0000
committerderaadt <>2021-10-24 21:24:20 +0000
commit2cbc009da6303d81a98bd284aae87c1761b472c7 (patch)
treeff84c733b0f95e616f61320c664f8d9ca970aa16 /src/lib/libcrypto/arc4random/getentropy_aix.c
parentcd96037ccee449c5bfb5e2fe0f58fc1357cdfa8e (diff)
downloadopenbsd-2cbc009da6303d81a98bd284aae87c1761b472c7.tar.gz
openbsd-2cbc009da6303d81a98bd284aae87c1761b472c7.tar.bz2
openbsd-2cbc009da6303d81a98bd284aae87c1761b472c7.zip
For open/openat, if the flags parameter does not contain O_CREAT, the
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert
Diffstat (limited to 'src/lib/libcrypto/arc4random/getentropy_aix.c')
-rw-r--r--src/lib/libcrypto/arc4random/getentropy_aix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/arc4random/getentropy_aix.c b/src/lib/libcrypto/arc4random/getentropy_aix.c
index 422e685dd8..7fb857e6d2 100644
--- a/src/lib/libcrypto/arc4random/getentropy_aix.c
+++ b/src/lib/libcrypto/arc4random/getentropy_aix.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getentropy_aix.c,v 1.7 2020/05/17 14:44:20 deraadt Exp $ */ 1/* $OpenBSD: getentropy_aix.c,v 1.8 2021/10/24 21:24:20 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2015 Michael Felt <aixtools@gmail.com> 4 * Copyright (c) 2015 Michael Felt <aixtools@gmail.com>
@@ -134,7 +134,7 @@ start:
134#ifdef O_CLOEXEC 134#ifdef O_CLOEXEC
135 flags |= O_CLOEXEC; 135 flags |= O_CLOEXEC;
136#endif 136#endif
137 fd = open(path, flags, 0); 137 fd = open(path, flags);
138 if (fd == -1) { 138 if (fd == -1) {
139 if (errno == EINTR) 139 if (errno == EINTR)
140 goto start; 140 goto start;