diff options
| author | deraadt <> | 2026-03-10 05:26:04 +0000 |
|---|---|---|
| committer | deraadt <> | 2026-03-10 05:26:04 +0000 |
| commit | 71927d7dd981f6e0a9705dd2ddf5bc60abfbaeab (patch) | |
| tree | 6e2c1fb20742e5ee81b095f375379c54645c81a0 /src/lib/libcrypto | |
| parent | 78f85e779d20fa57aa5102634e747be7f9343cf6 (diff) | |
| download | openbsd-71927d7dd981f6e0a9705dd2ddf5bc60abfbaeab.tar.gz openbsd-71927d7dd981f6e0a9705dd2ddf5bc60abfbaeab.tar.bz2 openbsd-71927d7dd981f6e0a9705dd2ddf5bc60abfbaeab.zip | |
use O_CLOEXEC; ok tb
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/rand/randfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/rand/randfile.c b/src/lib/libcrypto/rand/randfile.c index 5fdfcb8dd3..8b56585ee1 100644 --- a/src/lib/libcrypto/rand/randfile.c +++ b/src/lib/libcrypto/rand/randfile.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: randfile.c,v 1.45 2024/04/10 14:53:01 beck Exp $ */ | 1 | /* $OpenBSD: randfile.c,v 1.46 2026/03/10 05:26:04 deraadt Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -105,7 +105,7 @@ RAND_write_file(const char *file) | |||
| 105 | return (1); | 105 | return (1); |
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | fd = open(file, O_WRONLY|O_CREAT, 0600); | 108 | fd = open(file, O_WRONLY|O_CREAT|O_CLOEXEC, 0600); |
| 109 | if (fd == -1) | 109 | if (fd == -1) |
| 110 | return (1); | 110 | return (1); |
| 111 | out = fdopen(fd, "wb"); | 111 | out = fdopen(fd, "wb"); |
