Import pwgen 2.03, submitted by Robert Nagy <thuglife@bsd.hu>.

Pwgen is a small, GPL'ed password generator which creates
passwords that can be easily memorized by a human.
This commit is contained in:
naddy 2003-12-03 02:18:44 +00:00
parent 30aece3562
commit 715195a51b
6 changed files with 71 additions and 0 deletions

28
security/pwgen/Makefile Normal file
View File

@ -0,0 +1,28 @@
# $OpenBSD: Makefile,v 1.1.1.1 2003/12/03 02:18:44 naddy Exp $
COMMENT= "simple password generator"
DISTNAME= pwgen-2.03
CATEGORIES= security
MAINTAINER= Robert Nagy <thuglife@bsd.hu>
HOMEPAGE= http://sourceforge.net/projects/pwgen/
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pwgen/}
# GPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
CONFIGURE_STYLE=autoconf
MAKE_FLAGS= WALL_OPTS=""
NO_REGRESS= Yes
pre-configure:
@rm ${WRKSRC}/config.cache
.include <bsd.port.mk>

3
security/pwgen/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (pwgen-2.03.tar.gz) = 1a73657a0a10f3c3d00933036369e702
RMD160 (pwgen-2.03.tar.gz) = 9009a6af849d7f595ef62583dc0a7986e4fac488
SHA1 (pwgen-2.03.tar.gz) = c0af5a33f2dc9e6245737ce06524bfb86ada9d47

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-configure_in,v 1.1.1.1 2003/12/03 02:18:44 naddy Exp $
--- configure.in.orig 2003-12-03 02:06:27.000000000 +0100
+++ configure.in 2003-12-03 02:06:39.000000000 +0100
@@ -6,6 +6,6 @@ AC_PATH_PROG(MV, mv, mv)
AC_PATH_PROG(RM, rm, rm)
AC_PATH_PROG(SED, sed, sed)
AC_PATH_PROG(PERL, perl, perl)
-AC_CHECK_FUNCS(drand48 getopt_long)
+AC_CHECK_FUNCS(arc4random drand48 getopt_long)
AC_CHECK_HEADERS(getopt.h)
AC_OUTPUT(Makefile)

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-randnum_c,v 1.1.1.1 2003/12/03 02:18:44 naddy Exp $
--- randnum.c.orig 2003-12-03 02:06:51.000000000 +0100
+++ randnum.c 2003-12-03 02:09:07.000000000 +0100
@@ -17,6 +17,15 @@
#include "pwgen.h"
+#ifdef HAVE_ARC4RANDOM
+
+int pw_random_number(int max_num)
+{
+ return (arc4random() % max_num);
+}
+
+#else
+
#ifdef HAVE_DRAND48
extern double drand48(void);
#endif
@@ -90,3 +99,4 @@ int pw_random_number(int max_num)
return ((int) (random() / ((float) RAND_MAX) * max_num));
#endif
}
+#endif /* HAVE_ARC4RANDOM */

2
security/pwgen/pkg/DESCR Normal file
View File

@ -0,0 +1,2 @@
Pwgen is a small, GPL'ed password generator which creates
passwords that can be easily memorized by a human.

3
security/pwgen/pkg/PLIST Normal file
View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2003/12/03 02:18:44 naddy Exp $
bin/pwgen
man/man1/pwgen.1