From 571f5e595a552cf6630c5e0a86c85ee8db480dbe Mon Sep 17 00:00:00 2001 From: alek Date: Sat, 11 Jun 2005 09:46:08 +0000 Subject: [PATCH] Import kpoppassd 0.5 (this time with correct name -- kpoppassd without w) kpoppassd is a kerberos password changing daemon that behaves like poppassd. It allows a user to change his/her password remotely without having to login. This is particularly useful for webmail systems that use imap (i.e. horde/imp). The daemon works exactly like the original poppassd. The only difference being that this poppassd changes a user's Kerberos 5 password. From Antoine Jacoutot --- mail/kpoppassd/Makefile | 29 +++++++++++++++++++ mail/kpoppassd/distinfo | 4 +++ mail/kpoppassd/patches/patch-Makefile | 30 ++++++++++++++++++++ mail/kpoppassd/patches/patch-kpoppassd | 39 ++++++++++++++++++++++++++ mail/kpoppassd/pkg/DESCR | 6 ++++ mail/kpoppassd/pkg/MESSAGE | 12 ++++++++ mail/kpoppassd/pkg/PLIST | 5 ++++ mail/kpoppassd/pkg/UNMESSAGE | 2 ++ 8 files changed, 127 insertions(+) create mode 100755 mail/kpoppassd/Makefile create mode 100755 mail/kpoppassd/distinfo create mode 100644 mail/kpoppassd/patches/patch-Makefile create mode 100644 mail/kpoppassd/patches/patch-kpoppassd create mode 100644 mail/kpoppassd/pkg/DESCR create mode 100755 mail/kpoppassd/pkg/MESSAGE create mode 100755 mail/kpoppassd/pkg/PLIST create mode 100755 mail/kpoppassd/pkg/UNMESSAGE diff --git a/mail/kpoppassd/Makefile b/mail/kpoppassd/Makefile new file mode 100755 index 00000000000..e785b428da8 --- /dev/null +++ b/mail/kpoppassd/Makefile @@ -0,0 +1,29 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2005/06/11 09:46:08 alek Exp $ + +COMMENT= "pop password changing daemon using KerberosV" + +DISTNAME= kpoppassd-0.5 +CATEGORIES= mail + +HOMEPAGE= http://kpoppassd.sourceforge.net/ + +MAINTAINER= Antoine Jacoutot + +# GPL +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP=Y es +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=kpoppassd/} + +WANTLIB= c com_err crypto krb5 + +WRKDIST= ${WRKDIR}/kpoppassd + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/kpoppassd ${PREFIX}/libexec + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/kpoppassd + ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/kpoppassd + +.include diff --git a/mail/kpoppassd/distinfo b/mail/kpoppassd/distinfo new file mode 100755 index 00000000000..fc6f84eec79 --- /dev/null +++ b/mail/kpoppassd/distinfo @@ -0,0 +1,4 @@ +MD5 (kpoppassd-0.5.tar.gz) = 4d816b28de380bfe4c8feca2ef465ddd +RMD160 (kpoppassd-0.5.tar.gz) = fe16014487d55a39d82f5ce7862e905a2830a51c +SHA1 (kpoppassd-0.5.tar.gz) = 22ee3c4ac5c6534819b57db476ec85f62af02e9d +SIZE (kpoppassd-0.5.tar.gz) = 11848 diff --git a/mail/kpoppassd/patches/patch-Makefile b/mail/kpoppassd/patches/patch-Makefile new file mode 100644 index 00000000000..3f7e35efb25 --- /dev/null +++ b/mail/kpoppassd/patches/patch-Makefile @@ -0,0 +1,30 @@ +$OpenBSD: patch-Makefile,v 1.1.1.1 2005/06/11 09:46:08 alek Exp $ +--- Makefile.orig Sat Feb 28 02:41:10 2004 ++++ Makefile Sat Jun 11 11:00:39 2005 +@@ -1,18 +1,19 @@ + BINDIR = /usr/sbin + #FLAGS = -O2 -g +-FLAGS = -O2 +-INCLUDE = -I/usr/kerberos/include -I/usr/kerberos/include/krb5 +-KRB5_LIBS_DIR = -L/usr/kerberos/lib +-KRB5_BASE_LIBS = -lkrb5 -lk5crypto -lcom_err +-CC=gcc ++FLAGS = ${CFLAGS} ++INCLUDE = -I/usr/include/kerberosV ++KRB5_LIBS_DIR = -L/usr/lib ++KRB5_BASE_LIBS = -lkrb5 -lcrypto -lcom_err + SOURCE = kpoppassd.c + BIN = kpoppassd + ++all: kpoppassd ++ + kpoppassd: kpoppassd.c Makefile +- $(CC) $(SOURCE) -o $(BIN) -I$(INCLUDE) $(INCLUDE) $(KRB5_LIBS_DIR) $(KRB5_BASE_LIBS) $(FLAGS) ++ $(CC) $(SOURCE) -o $(BIN) $(INCLUDE) $(KRB5_LIBS_DIR) $(KRB5_BASE_LIBS) $(FLAGS) + + install: kpoppassd +- install -g bin -o root -m 500 kpoppassd $(BINDIR) ++ $(BSD_INSTALL_PROGRAM) kpoppassd $(BINDIR) + + clean: + rm -f *.o kpoppassd diff --git a/mail/kpoppassd/patches/patch-kpoppassd b/mail/kpoppassd/patches/patch-kpoppassd new file mode 100644 index 00000000000..16f21d7da50 --- /dev/null +++ b/mail/kpoppassd/patches/patch-kpoppassd @@ -0,0 +1,39 @@ +$OpenBSD: patch-kpoppassd,v 1.1.1.1 2005/06/11 09:46:08 alek Exp $ +--- kpoppassd.c.orig Tue Apr 29 04:12:05 2003 ++++ kpoppassd.c Wed Jun 8 00:34:39 2005 +@@ -40,7 +40,7 @@ + */ + + /** !!! IMPORTANT !!! Look these over and adjust for your system. **/ +-#define VERSION "0.4" ++#define VERSION "0.5" + #define BAD_PASS_DELAY 3 /* delay in seconds after bad 'Old password' */ + #define MAX_LEN_USERNAME "16" /* maximum length of username */ + #define MAX_PARSELEN_PASS "126" /* maximum length for sscanf */ +@@ -48,7 +48,7 @@ + #define MIN_LEN_PASS 6 + #define BUFSIZE 128 + #define SALT_SIZE 2 +-#define NOPASSWD /* If this is defined then it will check ++/*#define NOPASSWD*/ /* If this is defined then it will check + if the user exists in /etc/passwd! */ + + #include +@@ -233,7 +233,7 @@ int main (int argc, char *argv[]) + } + + /* Check for trusted system compliance. */ +- for ( i = 0; i < length; i++ ) ++ /* for ( i = 0; i < length; i++ ) + { + if ( isalpha(newpass[i]) ) + num_alpha++; +@@ -244,7 +244,7 @@ int main (int argc, char *argv[]) + { + WriteToClient("500 New password must contain at least two alpha characters and one nonalpha character."); + exit(1); +- } ++ } */ + + if (ret = krb5_change_password(context, &creds, newpass, + &result_code, &result_code_string, diff --git a/mail/kpoppassd/pkg/DESCR b/mail/kpoppassd/pkg/DESCR new file mode 100644 index 00000000000..36559253f92 --- /dev/null +++ b/mail/kpoppassd/pkg/DESCR @@ -0,0 +1,6 @@ +kpoppassd is a kerberos password changing daemon that behaves like +poppassd. It allows a user to change his/her password remotely without +having to login. This is particularly useful for webmail systems that +use imap (i.e. horde/imp). The daemon works exactly like the original +poppassd. The only difference being that this poppassd changes a user's +Kerberos 5 password. diff --git a/mail/kpoppassd/pkg/MESSAGE b/mail/kpoppassd/pkg/MESSAGE new file mode 100755 index 00000000000..c5537c5334e --- /dev/null +++ b/mail/kpoppassd/pkg/MESSAGE @@ -0,0 +1,12 @@ +To use kpoppassd, you must add the following lines +to /etc/services: + + poppassd 106/tcp # Eudora compatible password Server + +and to /etc/inetd.conf: + + 127.0.0.1:poppassd stream tcp nowait root \ + ${PREFIX}/libexec/kpoppassd kpoppassd + +Then, you must (re)start inetd as root. +kpoppassd uses the LOG_LOCAL4 syslog facility for logging. diff --git a/mail/kpoppassd/pkg/PLIST b/mail/kpoppassd/pkg/PLIST new file mode 100755 index 00000000000..031baa9a491 --- /dev/null +++ b/mail/kpoppassd/pkg/PLIST @@ -0,0 +1,5 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2005/06/11 09:46:08 alek Exp $ +libexec/kpoppassd +share/doc/kpoppassd/ +share/doc/kpoppassd/COPYING +share/doc/kpoppassd/README diff --git a/mail/kpoppassd/pkg/UNMESSAGE b/mail/kpoppassd/pkg/UNMESSAGE new file mode 100755 index 00000000000..7c81e25fff0 --- /dev/null +++ b/mail/kpoppassd/pkg/UNMESSAGE @@ -0,0 +1,2 @@ +If you don't plan on using this package anymore, remove the +corresponding lines from /etc/inetd.conf and /etc/services.