pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils/qpasswd Add qpasswd, a set of password-checki...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f748e7182c1e
branches: trunk
changeset: 383581:f748e7182c1e
user: schmonz <schmonz%pkgsrc.org@localhost>
date: Sun Aug 05 15:00:46 2018 +0000
description:
Add qpasswd, a set of password-checking tools for many
authentication schemes.
The qpasswd tools are meant for use with checkpassword-compatible
authentication programs like qmail-popup and qmail-smtpd. Currently, the
following auth mechanisms are supported: plain, login, apop, cram-md5,
cram-sha1, cram-ripemd, and digest-md5. The tools:
- multicheckpw (runs multiple checkpassword programs)
- checkqpasswd (for virtual users)
- checkpasswd (for system users in /etc/passwd)
diffstat:
sysutils/qpasswd/ALTERNATIVES | 1 +
sysutils/qpasswd/DESCR | 10 ++++
sysutils/qpasswd/Makefile | 35 +++++++++++++++
sysutils/qpasswd/PLIST | 9 ++++
sysutils/qpasswd/distinfo | 9 ++++
sysutils/qpasswd/patches/patch-Makefile | 71 ++++++++++++++++++++++++++++++++
sysutils/qpasswd/patches/patch-params.h | 26 +++++++++++
sysutils/qpasswd/patches/patch-qpasswd.h | 22 +++++++++
8 files changed, 183 insertions(+), 0 deletions(-)
diffs (215 lines):
diff -r 8cf394989e9e -r f748e7182c1e sysutils/qpasswd/ALTERNATIVES
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/qpasswd/ALTERNATIVES Sun Aug 05 15:00:46 2018 +0000
@@ -0,0 +1,1 @@
+bin/nbcheckpassword @PREFIX@/bin/checkqpasswd
diff -r 8cf394989e9e -r f748e7182c1e sysutils/qpasswd/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/qpasswd/DESCR Sun Aug 05 15:00:46 2018 +0000
@@ -0,0 +1,10 @@
+The qpasswd tools are meant for use with checkpassword-compatible
+authentication programs like qmail-popup and qmail-smtpd. Currently, the
+following auth mechanisms are supported: plain, login, apop, cram-md5,
+cram-sha1, cram-ripemd, and digest-md5. The tools:
+
+- multicheckpw (runs multiple checkpassword programs)
+
+- checkqpasswd (for virtual users)
+
+- checkpasswd (for system users in /etc/passwd)
diff -r 8cf394989e9e -r f748e7182c1e sysutils/qpasswd/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/qpasswd/Makefile Sun Aug 05 15:00:46 2018 +0000
@@ -0,0 +1,35 @@
+# $NetBSD: Makefile,v 1.1 2018/08/05 15:00:46 schmonz Exp $
+
+DISTNAME= qpasswd-0.5
+CATEGORIES= sysutils
+MASTER_SITES= ${HOMEPAGE}dl/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= schmonz%NetBSD.org@localhost
+HOMEPAGE= https://mcmilk.de/projects/qpasswd/
+COMMENT= Password-checking tools for many authentication schemes
+#LICENSE= # TODO: (see mk/license.mk)
+
+SUBST_CLASSES+= paths
+SUBST_STAGE.paths= pre-build
+SUBST_FILES.paths= man/checkqpasswd.8 man/qpasswd.5
+SUBST_FILES.paths+= qpasswd_gethome.c usage.c do_checkqpasswd.c params.h
+SUBST_FILES.paths+= params.h do_checkqpasswd.c qpasswd_gethome.c usage.c
+SUBST_SED.paths= -e 's|/etc/qpasswd|${PKG_SYSCONFDIR}/qpasswd|g'
+
+DJB_RESTRICTED= no
+
+LDFLAGS.Linux+= -lcrypt
+LDFLAGS.NetBSD+= -lcrypt
+
+NO_CONFIGURE= yes
+TEST_TARGET= check
+
+BUILD_DEFS+= QMAIL_NOFILES_GROUP QMAIL_ROOT_USER
+
+SPECIAL_PERMS+= bin/multicheckpw ${QMAIL_ROOT_USER} ${QMAIL_NOFILES_GROUP} 4510
+
+INSTALLATION_DIRS= bin ${PKGMANDIR}
+
+.include "../../mk/djbware.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 8cf394989e9e -r f748e7182c1e sysutils/qpasswd/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/qpasswd/PLIST Sun Aug 05 15:00:46 2018 +0000
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2018/08/05 15:00:46 schmonz Exp $
+bin/checkpasswd
+bin/checkqpasswd
+bin/multicheckpw
+bin/qpasswd
+man/man5/qpasswd.5
+man/man8/checkpasswd.8
+man/man8/checkqpasswd.8
+man/man8/multicheckpw.8
diff -r 8cf394989e9e -r f748e7182c1e sysutils/qpasswd/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/qpasswd/distinfo Sun Aug 05 15:00:46 2018 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2018/08/05 15:00:46 schmonz Exp $
+
+SHA1 (qpasswd-0.5.tar.bz2) = 72cb41406cf1c3542fc70aefbbde74e7c3dd4cf5
+RMD160 (qpasswd-0.5.tar.bz2) = 0b596c1c487bd9d7c45d2710687f17e2b509a64d
+SHA512 (qpasswd-0.5.tar.bz2) = 3ff454b1939a84fb75be54b1a80d5710a710d78af565e2bcaacf1ec37eea9b56450e5c776c41e857cc3c8877dad950f8144023c11c4dca429b8b27108b466951
+Size (qpasswd-0.5.tar.bz2) = 71473 bytes
+SHA1 (patch-Makefile) = c0da81b6a27bc75c43e04bd88c7555ac67352ac9
+SHA1 (patch-params.h) = 5836dc6d86b64efb54f23a8ea5558b3d00bb84ce
+SHA1 (patch-qpasswd.h) = 1d63eb7f55022d1c6f8dea665c5472346c992157
diff -r 8cf394989e9e -r f748e7182c1e sysutils/qpasswd/patches/patch-Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/qpasswd/patches/patch-Makefile Sun Aug 05 15:00:46 2018 +0000
@@ -0,0 +1,71 @@
+$NetBSD: patch-Makefile,v 1.1 2018/08/05 15:00:46 schmonz Exp $
+
+Use pkgsrc paths, flags, users, etc.
+
+--- Makefile.orig 2004-04-08 12:59:11.000000000 +0000
++++ Makefile
+@@ -3,20 +3,20 @@
+ # - change it to fit your needs
+ # - see also params.h
+
+-MANDIR = /usr/share/man
+-DEST = /command
+-GROUP = nofiles
++MANDIR = ${DESTDIR}${PREFIX}/${PKGMANDIR}
++DEST = ${DESTDIR}${PREFIX}/bin
++#GROUP = nofiles
+
+ ARCH = $(shell uname -m | sed -e 's/i[4-9]86/i386/' -e 's/armv[3-6][lb]/arm/')
+ DIET = $(shell basename `which diet 2>/dev/null` 2>/dev/null)
+
+ # compiler
+ CC = $(DIET) gcc
+-CFLAGS = -Os -Wall -pipe -fomit-frame-pointer
+-LDFLAGS = -s -lcrypt
++CFLAGS += -Os -Wall -pipe -fomit-frame-pointer
++#LDFLAGS = -s -lcrypt
+
+ # extraflags
+-CFLAGS += -mpreferred-stack-boundary=2 -march=$(ARCH) -mcpu=$(ARCH)
++#CFLAGS += -mpreferred-stack-boundary=2 -march=$(ARCH) -mcpu=$(ARCH)
+ #CFLAGS += -W -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wswitch -Wredundant-decls -Wunused
+ #CFLAGS += -Werror
+ #CFLAGS += -funroll-loops
+@@ -46,17 +46,15 @@ again: clean setup
+
+ multicheckpw: $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
+- $(STRIP) $@
+ for i in checkpasswd checkqpasswd qpasswd; do \
+ ( test -f $$i || ln -s multicheckpw $$i ) \
+ done
+
+ test-cases: $(OBJS2)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS2)
+- $(STRIP) $@
+
+ check: test-cases
+- test-cases > test-cases.computed
++ ./test-cases > test-cases.computed
+ @echo If the following test fails, send a mail to crypto%mcmilk.de@localhost!
+ diff test-cases.wanted test-cases.computed
+ @echo The test was OKAY!
+@@ -66,15 +64,14 @@ clean:
+
+ .c.o:
+ $(CC) $(CFLAGS) -c $< -o $@
+- $(STRIPx) $@
+
+-install: uninstall
++install:
+ test -d $(MANDIR)/man5 || mkdir -p $(MANDIR)/man5
+ test -d $(MANDIR)/man8 || mkdir -p $(MANDIR)/man8
+ man/install-pages.sh $(MANDIR)
+ cp -f multicheckpw $(DEST)/multicheckpw
+- chown root.$(GROUP) $(DEST)/multicheckpw
+- chmod 4510 $(DEST)/multicheckpw
++ #chown root.$(GROUP) $(DEST)/multicheckpw
++ #chmod 4510 $(DEST)/multicheckpw
+ ln -s multicheckpw $(DEST)/checkpasswd
+ ln -s multicheckpw $(DEST)/checkqpasswd
+ ln -s multicheckpw $(DEST)/qpasswd
diff -r 8cf394989e9e -r f748e7182c1e sysutils/qpasswd/patches/patch-params.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/qpasswd/patches/patch-params.h Sun Aug 05 15:00:46 2018 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-params.h,v 1.1 2018/08/05 15:00:46 schmonz Exp $
+
+Avoid Linuxisms.
+
+--- params.h.orig 2004-01-13 16:17:32.000000000 +0000
++++ params.h
+@@ -18,7 +18,7 @@
+ #define WANT_USAGE 1 /* see usage.c */
+ #define WANT_PIDINFO 1 /* see doname.c */
+ #define WANT_VALID_SHELL 1 /* check for a valid shell */
+-#define WANT_SHADOW_PASSWD 1 /* support for getspnam() */
++#define WANT_SHADOW_PASSWD 0 /* support for getspnam() */
+ #define WANT_LASTPOP 0 /* support for the .lastpop file */
+ #define WANT_DIE_MSG 1 /* die_msg(code, "description") -> exit(exit) */
+ #define WANT_DEBUG 0 /* enable extra debugging messages */
+@@ -40,8 +40,8 @@
+ #define LOG_VHOME_FOUND 1 /* see doc/ENVIRON */
+
+ /* define here the setuid/setgid functions of your system */
+-#define SETuid(x) setresuid(x,x,x)
+-#define SETgid(x) setresgid(x,x,x)
++#define SETuid(x) setuid(x)
++#define SETgid(x) setgid(x)
+
+ /* seconds - for pop3-before-smtp (todo!) */
+ #define LASTPOP_DEFAULT 23
diff -r 8cf394989e9e -r f748e7182c1e sysutils/qpasswd/patches/patch-qpasswd.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/qpasswd/patches/patch-qpasswd.h Sun Aug 05 15:00:46 2018 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-qpasswd.h,v 1.1 2018/08/05 15:00:46 schmonz Exp $
+
+Avoid Linuxisms.
+
+--- qpasswd.h.orig 2004-01-13 16:10:18.000000000 +0000
++++ qpasswd.h
+@@ -8,14 +8,13 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
++#include <sys/wait.h>
+ #include <unistd.h>
+ #include <signal.h>
+-#include <shadow.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <errno.h>
+-#include <wait.h>
+ #include <time.h>
+ #include <grp.h>
+ #include <pwd.h>
Home |
Main Index |
Thread Index |
Old Index