aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--Makefile134
-rw-r--r--Makefile.in5
-rw-r--r--debian/changelog10
-rw-r--r--debian/control14
-rw-r--r--debian/pwgen-udeb.dirs1
-rwxr-xr-xdebian/rules1
-rw-r--r--pwgen.110
-rw-r--r--pwgen.c4
9 files changed, 183 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 55f6d7b..19cdd4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-01-15 Theodore Ts'o <tytso@mit.edu>
+
+ * Release of pwgen 2.05
+
+ * pwgen.1: Fix spelling mistakes in the man page (Addresses Debian
+ Bug: #323538)
+
+ * pwgen.c (main): Fix bug which would cause pwgen to loop forever
+ if the password length specified is 1.
+
2005-06-15 Theodore Ts'o <tytso@mit.edu>
* pw_phonemes.c (pw_phonemes): Allow one or more capital letters
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c298ebd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,134 @@
+PWGEN_VERSION=2.05
+
+srcdir = .
+top_srcdir = .
+
+top_builddir = .
+my_dir = .
+prefix = /usr/local
+mandir = ${prefix}/man
+INSTALL = /usr/bin/install -c
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_DATA = ${INSTALL} -m 644
+
+WALL_OPTS = -Wall -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes \
+ -Wshadow -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align \
+ -pedantic
+CC = gcc
+DEFS = -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DHAVE_DRAND48=1 -DHAVE_GETOPT_LONG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_GETOPT_H=1
+CFLAGS = -g -O2 $(WALL_OPTS)
+CPPFLAGS =
+ALL_CFLAGS = $(CPPFLAGS) $(DEFS) $(USE_WFLAGS) $(CFLAGS) $(XTRA_CFLAGS)
+LDFLAGS =
+RM = /bin/rm
+MV = /bin/mv
+SED = /bin/sed
+PERL = /usr/bin/perl
+TAR = tar
+
+all:: pwgen
+
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+
+OBJS= pwgen.o pw_phonemes.o pw_rand.o randnum.o sha1.o sha1num.o
+
+SRCS= pwgen.c pw_phonemes.c pw_rand.c randnum.c sha1.c sha1num.c
+
+
+pwgen: $(OBJS)
+ $(CC) $(LDFLAGS) -o pwgen $(OBJS)
+
+install: pwgen pwgen.1
+ mkdir -p $(DESTDIR)$(prefix)/bin $(DESTDIR)$(mandir)/man1
+ $(INSTALL_PROGRAM) pwgen $(DESTDIR)$(prefix)/bin/pwgen
+ $(INSTALL_DATA) $(srcdir)/pwgen.1 $(DESTDIR)$(mandir)/man1/pwgen.1
+
+clean:
+ $(RM) -f $(OBJS) pwgen *~
+
+distclean: clean
+ $(RM) -rf config.status config.log config.cache Makefile \
+ $(srcdir)/Makefile.in.old $(srcdir)/.exclude-file \
+ $(srcdir)/autom4te.cache
+
+#
+# Build source tar ball...
+#
+
+SRCROOT = pwgen-$(PWGEN_VERSION)
+
+$(srcdir)/.exclude-file:
+ a=$(SRCROOT); \
+ (cd $(srcdir)/.. && find src \( -name \*~ -o -name \*.orig \
+ -o -name CVS -o -name \*.rej \
+ -o -name TAGS -o -name \*.old -o -name \*.gmo \
+ -o -name changed-files -o -name .#\* \) \
+ -print) | sed -e "s/src/$$a/" > $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/config.log" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/config.status" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/config.cache" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/TODO" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
+ >> $(srcdir)/.exclude-file
+
+source_tar_file: $(srcdir)/.exclude-file
+ cd $(srcdir)/.. && a=$(SRCROOT); rm -f $$a ; ln -sf src $$a ; \
+ $(TAR) -c -h -v -f - \
+ -X $$a/.exclude-file $$a | \
+ gzip -9 > pwgen-$(PWGEN_VERSION).tar.gz
+ rm -f $(srcdir)/.exclude-file
+#
+# Autoconf magic...
+#
+
+$(top_builddir)/config.status: $(top_srcdir)/configure
+ cd $(top_builddir); ./config.status --recheck
+
+Makefile: $(srcdir)/Makefile.in $(DEP_MAKEFILE) $(top_builddir)/config.status
+ cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status
+
+$(top_srcdir)/configure: $(top_srcdir)/configure.in
+ cd $(top_srcdir) && autoconf
+
+#
+# Make depend magic...
+#
+
+.depend: Makefile $(SRCS) $(top_srcdir)/depfix.sed $(top_srcdir)/wordwrap.pl
+ if test -n "$(SRCS)" ; then \
+ $(CC) -M $(ALL_CFLAGS) $(SRCS) | \
+ $(SED) -f $(top_srcdir)/depfix.sed \
+ -e 's; $(srcdir)/; $$(srcdir)/;g' \
+ -e 's; $(top_srcdir)/; $$(top_srcdir)/;g' \
+ -e 's; $(top_builddir)/; $$(top_builddir)/;g' \
+ -e 's; \./; ;g' \
+ -e '/^ *\\$$/d' | \
+ $(PERL) $(top_srcdir)/wordwrap.pl > .depend; \
+ else :; fi
+
+depend:: .depend
+ if test -n "$(SRCS)" ; then \
+ sed -e '/^# +++ Dependency line eater +++/,$$d' \
+ < $(srcdir)/Makefile.in | cat - .depend \
+ > $(srcdir)/Makefile.in.new; \
+ if cmp -s $(srcdir)/Makefile.in $(srcdir)/Makefile.in.new ; then \
+ $(RM) $(srcdir)/Makefile.in.new ; \
+ else \
+ $(MV) $(srcdir)/Makefile.in $(srcdir)/Makefile.in.old; \
+ $(MV) $(srcdir)/Makefile.in.new $(srcdir)/Makefile.in; \
+ fi ; else :; fi
+
+# +++ Dependency line eater +++
+#
+# Makefile dependencies follow. This must be the last section in
+# the Makefile.in file
+#
+pwgen.o: pwgen.c pwgen.h
+pw_phonemes.o: pw_phonemes.c pwgen.h
+pw_rand.o: pw_rand.c pwgen.h
+randnum.o: randnum.c pwgen.h
+sha1.o: sha1.c sha1.h
+sha1num.o: sha1num.c sha1.h pwgen.h
diff --git a/Makefile.in b/Makefile.in
index 841d909..35cf2d9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
-PWGEN_VERSION=2.04
+PWGEN_VERSION=2.05
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@@ -67,6 +67,9 @@ $(srcdir)/.exclude-file:
-print) | sed -e "s/src/$$a/" > $(srcdir)/.exclude-file
echo "$(SRCROOT)/build" >> $(srcdir)/.exclude-file
echo "$(SRCROOT)/rpm.log" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/config.log" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/config.status" >> $(srcdir)/.exclude-file
+ echo "$(SRCROOT)/config.cache" >> $(srcdir)/.exclude-file
echo "$(SRCROOT)/TODO" >> $(srcdir)/.exclude-file
echo "$(SRCROOT)/.exclude-file" >> $(srcdir)/.exclude-file
>> $(srcdir)/.exclude-file
diff --git a/debian/changelog b/debian/changelog
index a8bcb27..cbe97e5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+pwgen (2.05-1) unstable; urgency=low
+
+ * Add a udeb for debian-installer. Thanks to Martin Michlmayr for the
+ patch. (Closes: #271115)
+ * Fix bug which would cause pwgen to loop forever if the password length
+ is 1.
+ * Fix spelling errors in the man page. (Closes: #323538)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu> Sun, 15 Jan 2006 23:16:59 -0500
+
pwgen (2.04-1) unstable; urgency=low
* New upstream version.
diff --git a/debian/control b/debian/control
index f70a72a..89779a2 100644
--- a/debian/control
+++ b/debian/control
@@ -15,3 +15,17 @@ Description: Automatic Password generation
Uppercase letters and digits are placed in a way that eases
remembering their position when memorizing only the word.
+Package: pwgen-udeb
+Architecture: any
+Depends: ${shlibs:Depends}
+Section: debian-installer
+XC-Package-Type: udeb
+Description: Automatic Password generation
+ pwgen generates random, meaningless but pronounceable passwords.
+ These passwords contain either only lowercase letters, or upper
+ and lower case mixed, or digits thrown in.
+ Uppercase letters and digits are placed in a way that eases
+ remembering their position when memorizing only the word.
+ .
+ pwgen-udeb is a minimal package used by debian-installer.
+
diff --git a/debian/pwgen-udeb.dirs b/debian/pwgen-udeb.dirs
new file mode 100644
index 0000000..e772481
--- /dev/null
+++ b/debian/pwgen-udeb.dirs
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/rules b/debian/rules
index 458054e..2bb9dcd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -28,6 +28,7 @@ install: build
dh_installdirs
$(MAKE) install DESTDIR=`pwd`/debian/pwgen
+ dh_install -ppwgen-udeb pwgen /usr/bin
binary-indep: build install
dh_testdir
diff --git a/pwgen.1 b/pwgen.1
index dd79f47..e7e9147 100644
--- a/pwgen.1
+++ b/pwgen.1
@@ -1,4 +1,4 @@
-.TH PWGEN 1 "June 2005" "pwgen version 2.04"
+.TH PWGEN 1 "January 2006" "pwgen version 2.05"
.SH NAME
pwgen \- generate pronounceable passwords
.SH SYNOPSIS
@@ -31,7 +31,7 @@ The
.B pwgen
program is designed
to be used both interactively, and in shell scripts. Hence,
-its default behaviour is differs depending on whether the standard output
+its default behavior is differs depending on whether the standard output
is a tty device or a pipe to another program. Used interactively,
.B pwgen
will display a screenful of passwords, allowing the user to pick a single
@@ -46,7 +46,7 @@ compatible with previous versions of this program. In addition, for
backwards compatibility reasons,
.B pwgen
will not use upper case letters or numbers by default in this mode,
-although this can be overriden using the
+although this can be overridden using the
.B \-n
and
.B \-c
@@ -70,7 +70,7 @@ backwards compatibility.
.B \-B, --ambiguous
Don't use characters that could be confused by the user when printed,
such as 'l' and '1', or '0' or 'O'. This reduces the number of possible
-passwords signficantly, and as such reduces the quality of the
+passwords significantly, and as such reduces the quality of the
passwords. It may be useful for users who have bad vision, but in
general use of this option is not recommended.
.TP
@@ -96,7 +96,7 @@ if the standard output is a tty device.
Will use the sha1's hash of given file and the optional seed to create
password. It will allow you to compute the same password later,
if you remember the file, seed, and pwgen's options used.
-ie: pwgen -H ~/your_favourite.mp3#your@email.com gives
+ie: pwgen -H ~/your_favorite.mp3#your@email.com gives
a list of possibles passwords for your pop3 account, and you can
ask this list again and again.
.IP
diff --git a/pwgen.c b/pwgen.c
index 3af933b..a371f92 100644
--- a/pwgen.c
+++ b/pwgen.c
@@ -158,6 +158,10 @@ int main(int argc, char **argv)
pw_length = strtol(argv[optind], &tmp, 0);
if (pw_length < 5)
pwgen = pw_rand;
+ if (pw_length <= 2)
+ pwgen_flags &= ~PW_UPPERS;
+ if (pw_length <= 1)
+ pwgen_flags &= ~PW_DIGITS;
if (*tmp) {
fprintf(stderr, "Invalid password length: %s\n",
argv[optind]);