aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/rndunix.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-01-09 15:06:59 +0000
committerWerner Koch <[email protected]>1999-01-09 15:06:59 +0000
commit002b1a8632d2c2795deb4682ba6db8be120db9b4 (patch)
tree33a0e8c96550f24d9aa1747b05a9f471f975e7a7 /cipher/rndunix.c
parentSee ChangeLog: Thu Jan 7 18:00:58 CET 1999 Werner Koch (diff)
downloadgnupg-002b1a8632d2c2795deb4682ba6db8be120db9b4.tar.gz
gnupg-002b1a8632d2c2795deb4682ba6db8be120db9b4.zip
See ChangeLog: Sat Jan 9 16:02:23 CET 1999 Werner Koch
Diffstat (limited to 'cipher/rndunix.c')
-rw-r--r--cipher/rndunix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cipher/rndunix.c b/cipher/rndunix.c
index c005afba4..9e49ebc75 100644
--- a/cipher/rndunix.c
+++ b/cipher/rndunix.c
@@ -2,6 +2,7 @@
* *
* BeOS Randomness-Gathering Code *
* Copyright Peter Gutmann, Paul Kendall, and Chris Wedgwood 1996-1998 *
+ * Copyright (C) 1998, 1999 Werner Koch
* *
****************************************************************************/
@@ -678,6 +679,9 @@ gather_random( void (*add)(const void*, size_t, int), int requester,
size_t n;
if( !gatherer_pid ) {
+ /* make sure we are not setuid */
+ if( getuid() != geteuid() )
+ BUG();
/* time to start the gatherer process */
if( pipe( pipedes ) ) {
g10_log_error("pipe() failed: %s\n", strerror(errno));