apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jones" <oscare...@gmail.com>
Subject [PATCH] zOS conditionally supports /dev/random
Date Fri, 16 Nov 2007 21:32:45 GMT
A read on /dev/random (and /dev/urandom) returns a 0 instead of a -1 to
indicate an error on zOS levels 1.6 and prior.
This puts apr/misc/unix/rand.c and therefore /test/testrandom into an
infinite loop.
For zOS 1.7 and above, a read returns the expected number of bytes read, or
a -1 if there's an error (ex. crypto hardware (ICSF) is not usable).

Add to the config checks for random a zOS level check. For zOS 1.7 and above
config will indicate /dev/random is supported. At run time reads will
determine if ICSF is available, but respond correctly either way.

View raw message