aboutsummaryrefslogtreecommitdiffstats
path: root/cipher
diff options
context:
space:
mode:
Diffstat (limited to 'cipher')
-rw-r--r--cipher/ChangeLog5
-rw-r--r--cipher/random.c5
-rw-r--r--cipher/rndunix.c5
3 files changed, 14 insertions, 1 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index 7616fe521..7b73fb6a1 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,8 @@
+Thu Sep 14 14:20:38 CEST 2000 Werner Koch <[email protected]>
+
+ * random.c (fast_random_poll): Check ENOSYS for getrusage.
+ * rndunix.c: Add 2 sources for QNX. By Sam Roberts.
+
Wed Sep 13 18:12:34 CEST 2000 Werner Koch <[email protected]>
* rsa.c (secret): Speed up by using the CRT. For a 2k keys this
diff --git a/cipher/random.c b/cipher/random.c
index be23ddd3e..02fc2ba3a 100644
--- a/cipher/random.c
+++ b/cipher/random.c
@@ -594,8 +594,11 @@ fast_random_poll()
#endif
#else
{ struct rusage buf;
- if( getrusage( RUSAGE_SELF, &buf ) )
+ /* QNX/Neutrino does return ENOSYS - so we just ignore it and
+ * add whatever is in buf */
+ if( getrusage( RUSAGE_SELF, &buf ) && errno != ENOSYS )
BUG();
+
add_randomness( &buf, sizeof buf, 1 );
memset( &buf, 0, sizeof buf );
}
diff --git a/cipher/rndunix.c b/cipher/rndunix.c
index 905ce9333..7a3d76d87 100644
--- a/cipher/rndunix.c
+++ b/cipher/rndunix.c
@@ -242,6 +242,7 @@ static struct RI {
{ "/usr/ucb/ps", "aux", SC(0.3), NULL, 0, 0, 0, 1 },
{ "/usr/bin/ps", "aux", SC(0.3), NULL, 0, 0, 0, 1 },
{ "/bin/ps", "aux", SC(0.3), NULL, 0, 0, 0, 0 },
+ { "/bin/ps", "-A", SC(0.3), NULL, 0, 0, 0, 0 }, /*QNX*/
{ "/usr/bin/ipcs", "-a", SC(0.5), NULL, 0, 0, 0, 1 },
{ "/bin/ipcs", "-a", SC(0.5), NULL, 0, 0, 0, 0 },
/* Unreliable source, depends on system usage */
@@ -290,6 +291,10 @@ static struct RI {
/* This is a complex and screwball program. Some systems have things
* like rX_dmn, x = integer, for RAID systems, but the statistics are
* pretty dodgy */
+#ifdef __QNXNTO__
+ { "/bin/pidin", "-F%A%B%c%d%E%I%J%K%m%M%n%N%p%P%S%s%T", SC(0.3),
+ NULL, 0, 0, 0, 0 },
+#endif
#if 0
/* The following aren't enabled since they're somewhat slow and not very
* unpredictable, however they give an indication of the sort of sources