summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt
diff options
context:
space:
mode:
authormatthew <>2014-07-18 21:40:54 +0000
committermatthew <>2014-07-18 21:40:54 +0000
commitc08eb4d65e7656f34e0b7949bf7f3102cb5faaeb (patch)
treed35b51e66c8c108b69caf1250f41710acc15f577 /src/lib/libc/crypt
parent7e8a8e10eb33b800847c68f63d4a3c0fbac09cb9 (diff)
downloadopenbsd-c08eb4d65e7656f34e0b7949bf7f3102cb5faaeb.tar.gz
openbsd-c08eb4d65e7656f34e0b7949bf7f3102cb5faaeb.tar.bz2
openbsd-c08eb4d65e7656f34e0b7949bf7f3102cb5faaeb.zip
Cleanup portable arc4random fork detection code:
1. Use "len" parameter instead of sizeof(*rs). 2. Simplify the atfork handler to be strictly async signal safe by simply writing to a global volatile sig_atomic_t object, and then checking for this in _rs_forkdetect(). (Idea from discussions with Szabolcs Nagy and Rich Felker.) 3. Use memset(rs, 0, sizeof(*rs)) to match OpenBSD's MAP_INHERIT_ZERO fork semantics to avoid any skew in behavior across platforms. ok deraadt
Diffstat (limited to 'src/lib/libc/crypt')
0 files changed, 0 insertions, 0 deletions