From c3e6302a0357c80a47ba199083541c8d560caba8 Mon Sep 17 00:00:00 2001 From: naddy Date: Wed, 20 Feb 2002 16:55:49 +0000 Subject: [PATCH] * /dev/random -> /dev/arandom; jose@crimelabs.net, seb@todesplanet.de * cleanup --- security/apg/Makefile | 14 +++++++----- security/apg/patches/patch-Makefile | 34 ----------------------------- security/apg/patches/patch-rnd_c | 14 ++++++++++++ security/apg/patches/patch-rnd_h | 15 +++++++++++++ 4 files changed, 38 insertions(+), 39 deletions(-) delete mode 100644 security/apg/patches/patch-Makefile create mode 100644 security/apg/patches/patch-rnd_c create mode 100644 security/apg/patches/patch-rnd_h diff --git a/security/apg/Makefile b/security/apg/Makefile index 88b9b1815ec..f1bef8fd61a 100644 --- a/security/apg/Makefile +++ b/security/apg/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2002/01/25 17:38:50 jsyn Exp $ +# $OpenBSD: Makefile,v 1.4 2002/02/20 16:55:49 naddy Exp $ COMMENT= "automated password generator" @@ -10,22 +10,26 @@ HOMEPAGE= http://www.adel.nursat.kz/apg/ MAINTAINER= Jose Nazario +# BSD PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes MASTER_SITES= http://www.adel.nursat.kz/apg/download/ \ -MASTER_SITES= ${MASTER_SITE_PACKETSTORM} + ${MASTER_SITE_PACKETSTORM} MASTER_SITE_SUBDIR= UNIX/misc -MAKE_FLAGS= CC="${CC}" +MAKE_FLAGS= CC="${CC}" FLAGS="${CFLAGS}" \ + LIBS="" USE_SHA=APG_USE_SHA FAKE_FLAGS= INSTALL_PREFIX=${WRKINST}${PREFIX} NO_REGRESS= Yes post-install: - ${INSTALL_SCRIPT} ${WRKDIST}/perl/apgcli.pl ${PREFIX}/bin/apgcli - @${STRIP} ${PREFIX}{/bin/apg,/bin/apgbfm,/sbin/apgd} + ${INSTALL_SCRIPT} ${WRKSRC}/perl/apgcli.pl ${PREFIX}/bin/apgcli +.for prog in bin/apg bin/apgbfm sbin/apgd + ${STRIP} ${PREFIX}/${prog} +.endfor .include diff --git a/security/apg/patches/patch-Makefile b/security/apg/patches/patch-Makefile deleted file mode 100644 index 24a5dc774ba..00000000000 --- a/security/apg/patches/patch-Makefile +++ /dev/null @@ -1,34 +0,0 @@ -$OpenBSD: patch-Makefile,v 1.2 2002/01/24 19:35:16 jsyn Exp $ ---- Makefile.orig Thu Jan 24 12:56:45 2002 -+++ Makefile Thu Jan 24 12:57:54 2002 -@@ -6,13 +6,13 @@ - ################################################################## - # Compilation flags - # You should comment the line below for AIX+native cc --FLAGS = -Wall -+FLAGS = ${CFLAGS} - - ################################################################## - # Libraries - # - # You should comment the line below for OpenBSD 2.8 and above --LIBS = -lcrypt -+#LIBS = -lcrypt - LIBM = -lm - # Use lines below for cygwin - # LIBS = -@@ -32,12 +32,12 @@ - # DO NOT EDIT THE LINE BELOW !!! - USE_SHA = APG_USE_SHA - # Coment this if you want to use PRNG X9.17 with SHA-1 --USE_SHA = APG_DONOTUSE_SHA -+#USE_SHA = APG_DONOTUSE_SHA - - ################################################################## - # Directories - # Install dirs --INSTALL_PREFIX = /usr/local -+INSTALL_PREFIX = ${PREFIX} - APG_BIN_DIR = /bin - APG_MAN_DIR = /man/man1 - APGD_BIN_DIR = /sbin diff --git a/security/apg/patches/patch-rnd_c b/security/apg/patches/patch-rnd_c new file mode 100644 index 00000000000..da7d3398dc0 --- /dev/null +++ b/security/apg/patches/patch-rnd_c @@ -0,0 +1,14 @@ +$OpenBSD: patch-rnd_c,v 1.1 2002/02/20 16:55:50 naddy Exp $ +--- rnd.c.orig Wed Feb 20 17:48:27 2002 ++++ rnd.c Wed Feb 20 17:48:59 2002 +@@ -190,8 +190,8 @@ x917_setseed (UINT32 seed, int quiet) + #ifndef CLISERV + if (quiet != TRUE) + { +- fprintf(stderr,"CAN NOT USE /dev/random TO GENERATE RANDOM SEED\n"); +- fprintf(stderr,"USEING LOCAL TIME AND PID FOR SEED GENERATION !!!\n"); ++ fprintf(stderr,"CAN NOT USE RANDOM DEVICE TO GENERATE RANDOM SEED\n"); ++ fprintf(stderr,"USING LOCAL TIME AND PID FOR SEED GENERATION !!!\n"); + fflush(stderr); + } + #endif /* CLISERV */ diff --git a/security/apg/patches/patch-rnd_h b/security/apg/patches/patch-rnd_h new file mode 100644 index 00000000000..0f1da85e4b1 --- /dev/null +++ b/security/apg/patches/patch-rnd_h @@ -0,0 +1,15 @@ +$OpenBSD: patch-rnd_h,v 1.1 2002/02/20 16:55:50 naddy Exp $ +--- rnd.h.orig Wed Feb 20 17:49:10 2002 ++++ rnd.h Wed Feb 20 17:50:10 2002 +@@ -37,7 +37,11 @@ + extern UINT32 __rnd_seed[2]; + + #define RND_MX 0x7FFFFFFF ++#ifdef __OpenBSD__ ++#define APG_DEVRANDOM "/dev/arandom" ++#else + #define APG_DEVRANDOM "/dev/random" ++#endif + #define APG_DEVURANDOM "/dev/urandom" + + extern void x917_setseed (UINT32 seed, int quiet);