diff options
author | Werner Koch <[email protected]> | 1999-01-09 15:06:59 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1999-01-09 15:06:59 +0000 |
commit | 002b1a8632d2c2795deb4682ba6db8be120db9b4 (patch) | |
tree | 33a0e8c96550f24d9aa1747b05a9f471f975e7a7 /cipher | |
parent | See ChangeLog: Thu Jan 7 18:00:58 CET 1999 Werner Koch (diff) | |
download | gnupg-002b1a8632d2c2795deb4682ba6db8be120db9b4.tar.gz gnupg-002b1a8632d2c2795deb4682ba6db8be120db9b4.zip |
See ChangeLog: Sat Jan 9 16:02:23 CET 1999 Werner Koch
Diffstat (limited to 'cipher')
-rw-r--r-- | cipher/ChangeLog | 6 | ||||
-rw-r--r-- | cipher/Makefile.am | 14 | ||||
-rw-r--r-- | cipher/md.c | 2 | ||||
-rw-r--r-- | cipher/random.c | 4 | ||||
-rw-r--r-- | cipher/rndunix.c | 4 |
5 files changed, 20 insertions, 10 deletions
diff --git a/cipher/ChangeLog b/cipher/ChangeLog index 347d3469c..ad7d6f83b 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,9 @@ +Sat Jan 9 16:02:23 CET 1999 Werner Koch <[email protected]> + + * rndunix.c (gather_random): check for setuid. + + * Makefile.am: Add a way to staically link random modules + Thu Jan 7 18:00:58 CET 1999 Werner Koch <[email protected]> * md.c (md_stop_debug): Do a flush first. diff --git a/cipher/Makefile.am b/cipher/Makefile.am index a27989cb0..4a7171071 100644 --- a/cipher/Makefile.am +++ b/cipher/Makefile.am @@ -1,18 +1,18 @@ ## Process this file with automake to produce Makefile.in -gnupg_extensions = tiger twofish rndunix - INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl noinst_LIBRARIES = libcipher.a + +EXTRA_PROGRAMS = tiger twofish rndunix rndlinux if ENABLE_GNUPG_EXTENSIONS -pkglib_PROGRAMS = $(gnupg_extensions) +pkglib_PROGRAMS = @DYNAMIC_CIPHER_MODS@ @DYNAMIC_RANDOM_MODS@ else pkglib_PROGRAMS = endif -DYNLINK_MOD_CFLAGS = -DIS_MODULE @DYNLINK_MOD_CFLAGS@ +DYNLINK_MOD_CFLAGS = -DIS_MODULE @DYNLINK_MOD_CFLAGS@ libcipher_a_SOURCES = cipher.c \ pubkey.c \ @@ -33,7 +33,6 @@ libcipher_a_SOURCES = cipher.c \ random.h \ random.c \ rand-internal.h \ - rndlinux.c \ rmd.h \ rmd160.c \ sha1.h \ @@ -43,9 +42,14 @@ libcipher_a_SOURCES = cipher.c \ g10c.c \ smallprime.c + +EXTRA_libcipher_a_SOURCES = rndlinux.c rndunix.c EXTRA_tiger_SOURCES = tiger.c EXTRA_twofish_SOURCES = twofish.c +libcipher_a_DEPENDENCIES = @STATIC_RANDOM_OBJS@ @STATIC_CIPHER_OBJS@ +libcipher_a_LIBADD = @STATIC_RANDOM_OBJS@ @STATIC_CIPHER_OBJS@ + tiger: $(srcdir)/tiger.c `echo $(COMPILE) $(DYNLINK_MOD_CFLAGS) -o tiger $(srcdir)/tiger.c | \ diff --git a/cipher/md.c b/cipher/md.c index f7be5e4cc..6e335db80 100644 --- a/cipher/md.c +++ b/cipher/md.c @@ -1,5 +1,5 @@ /* md.c - message digest dispatcher - * Copyright (C) 1998 Free Software Foundation, Inc. + * Copyright (C) 1998,1999 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/cipher/random.c b/cipher/random.c index 6f8a20aa1..1812467ae 100644 --- a/cipher/random.c +++ b/cipher/random.c @@ -122,13 +122,9 @@ initialize() #elif USE_RNDUNIX rndunix_constructor(); #elif USE_RNDW32 - rndw32_constructor(); #elif USE_RNDOS2 - rndos2_constructor(); #elif USE_RNDATARI - rndatari_constructor(); #elif USE_RNDMVS - rndmvs_constructor(); #endif } 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)); |