diff options
author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
commit | eb8dd9dca1228af0cd132f515509051ecfabf6f6 (patch) | |
tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/lib/libc/crypt/arc4random.h | |
parent | 247f0352e0ed72a4f476db9dc91f4d982bc83eb2 (diff) | |
download | openbsd-tb_20250414.tar.gz openbsd-tb_20250414.tar.bz2 openbsd-tb_20250414.zip |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/lib/libc/crypt/arc4random.h')
-rw-r--r-- | src/lib/libc/crypt/arc4random.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/lib/libc/crypt/arc4random.h b/src/lib/libc/crypt/arc4random.h deleted file mode 100644 index 4abd15321a..0000000000 --- a/src/lib/libc/crypt/arc4random.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* $OpenBSD: arc4random.h,v 1.4 2015/01/15 06:57:18 deraadt Exp $ */ | ||
2 | |||
3 | /* | ||
4 | * Copyright (c) 1996, David Mazieres <dm@uun.org> | ||
5 | * Copyright (c) 2008, Damien Miller <djm@openbsd.org> | ||
6 | * Copyright (c) 2013, Markus Friedl <markus@openbsd.org> | ||
7 | * Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org> | ||
8 | * | ||
9 | * Permission to use, copy, modify, and distribute this software for any | ||
10 | * purpose with or without fee is hereby granted, provided that the above | ||
11 | * copyright notice and this permission notice appear in all copies. | ||
12 | * | ||
13 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
15 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
16 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
17 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
18 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
19 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
20 | */ | ||
21 | |||
22 | /* | ||
23 | * Stub functions for portability. | ||
24 | */ | ||
25 | #include <sys/mman.h> | ||
26 | |||
27 | #include <signal.h> | ||
28 | |||
29 | #include "thread_private.h" | ||
30 | |||
31 | static inline void | ||
32 | _getentropy_fail(void) | ||
33 | { | ||
34 | raise(SIGKILL); | ||
35 | } | ||
36 | |||
37 | static inline int | ||
38 | _rs_allocate(struct _rs **rsp, struct _rsx **rsxp) | ||
39 | { | ||
40 | struct { | ||
41 | struct _rs rs; | ||
42 | struct _rsx rsx; | ||
43 | } *p; | ||
44 | |||
45 | if ((p = mmap(NULL, sizeof(*p), PROT_READ|PROT_WRITE, | ||
46 | MAP_ANON|MAP_PRIVATE, -1, 0)) == MAP_FAILED) | ||
47 | return (-1); | ||
48 | if (minherit(p, sizeof(*p), MAP_INHERIT_ZERO) == -1) { | ||
49 | munmap(p, sizeof(*p)); | ||
50 | return (-1); | ||
51 | } | ||
52 | |||
53 | *rsp = &p->rs; | ||
54 | *rsxp = &p->rsx; | ||
55 | return (0); | ||
56 | } | ||
57 | |||
58 | static inline void | ||
59 | _rs_forkdetect(void) | ||
60 | { | ||
61 | } | ||