From 002b1a8632d2c2795deb4682ba6db8be120db9b4 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Sat, 9 Jan 1999 15:06:59 +0000 Subject: See ChangeLog: Sat Jan 9 16:02:23 CET 1999 Werner Koch --- cipher/rndunix.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cipher/rndunix.c') 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)); -- cgit v1.2.3