summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-mail/cmd5checkpw
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-mail/cmd5checkpw')
-rw-r--r--net-mail/cmd5checkpw/Manifest1
-rw-r--r--net-mail/cmd5checkpw/cmd5checkpw-0.30-r1.ebuild69
-rw-r--r--net-mail/cmd5checkpw/files/euid_030.diff49
-rw-r--r--net-mail/cmd5checkpw/files/poppasswd3
-rw-r--r--net-mail/cmd5checkpw/files/reloc.diff63
-rw-r--r--net-mail/cmd5checkpw/metadata.xml5
6 files changed, 190 insertions, 0 deletions
diff --git a/net-mail/cmd5checkpw/Manifest b/net-mail/cmd5checkpw/Manifest
new file mode 100644
index 000000000000..d0a1f503d44d
--- /dev/null
+++ b/net-mail/cmd5checkpw/Manifest
@@ -0,0 +1 @@
+DIST cmd5checkpw-030_tgz.bin 25812 SHA256 88588e134a498f7efa69ee1d2a217aec7cb65a41b4206100455b5aa40d692f2d
diff --git a/net-mail/cmd5checkpw/cmd5checkpw-0.30-r1.ebuild b/net-mail/cmd5checkpw/cmd5checkpw-0.30-r1.ebuild
new file mode 100644
index 000000000000..21919000999c
--- /dev/null
+++ b/net-mail/cmd5checkpw/cmd5checkpw-0.30-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils fixheadtails user
+
+MY_VER="030"
+
+DESCRIPTION="A checkpassword compatible authentication program that used CRAM-MD5 authentication mode"
+SRC_URI="http://www.fehcom.de/qmail/auth/${PN}-${MY_VER}_tgz.bin"
+HOMEPAGE="http://www.fehcom.de/qmail/smtpauth.html"
+
+LICENSE="public-domain RSA"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+pkg_setup() {
+ enewuser cmd5checkpw 212 -1 /dev/null bin
+ ewarn
+ ewarn "this version is in NO WAY COMPATIBLE with cmd5checkpw-0.2x"
+ ewarn "it actually receives the authentication credentials"
+ ewarn "in a different order then the old implementation"
+ ewarn "see bug #100693 for details"
+ ewarn "this version IS needed by >=qmail-1.03-r16"
+ ewarn
+}
+
+src_unpack() {
+ # The old code moved the file in DISTDIR, which is forbidden.
+ # It's read-only.
+ cd "${WORKDIR}"
+ rm -f ${PN}-${MY_VER}.tar.gz
+ ln -s "${DISTDIR}"/${PN}-${MY_VER}_tgz.bin ${PN}-${MY_VER}.tar.gz
+ unpack ./${PN}-${MY_VER}.tar.gz
+ cd "${S}"
+
+ epatch "${FILESDIR}"/euid_${MY_VER}.diff
+ epatch "${FILESDIR}"/reloc.diff
+
+ sed -e 's:-c -g -Wall -O3:$(OPTCFLAGS):' -i Makefile
+
+ ht_fix_file Makefile
+}
+
+src_compile() {
+ emake OPTCFLAGS="${CFLAGS}" || die
+}
+
+src_install() {
+ insinto /etc
+ doins "${FILESDIR}"/poppasswd
+
+ exeinto /bin
+ doexe cmd5checkpw
+ doman cmd5checkpw.8
+
+ fowners cmd5checkpw /etc/poppasswd /bin/cmd5checkpw
+ fperms 400 /etc/poppasswd
+ fperms u+s /bin/cmd5checkpw
+}
+
+pkg_postinst() {
+ chmod 400 "${ROOT}"/etc/poppasswd
+ chown cmd5checkpw "${ROOT}"/etc/poppasswd
+}
diff --git a/net-mail/cmd5checkpw/files/euid_030.diff b/net-mail/cmd5checkpw/files/euid_030.diff
new file mode 100644
index 000000000000..12fa9ecc2e5d
--- /dev/null
+++ b/net-mail/cmd5checkpw/files/euid_030.diff
@@ -0,0 +1,49 @@
+diff -upr cmd5checkpw-0.30.orig/main.c cmd5checkpw-0.30/main.c
+--- cmd5checkpw-0.30.orig/main.c 2003-09-18 16:34:01.000000000 +0300
++++ cmd5checkpw-0.30/main.c 2005-07-31 13:19:25.000000000 +0300
+@@ -5,6 +5,7 @@
+ #include <pwd.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#include <sys/types.h>
+
+ #define LINE_MAX 256
+ #define SASLUSERFILE "/var/qmail/users/authuser"
+@@ -23,10 +24,26 @@ int doit(unsigned char *testlogin, unsig
+ unsigned char h;
+ FILE *fp;
+ int j;
+-
++ uid_t uid;
++ gid_t gid;
+ char *linepnt;
+
+ if ((fp = fopen(SASLUSERFILE, READONLY)) == NULL) _exit(2);
++
++ uid = getuid();
++ gid = getgid();
++
++ if (gid != getegid()) {
++ if (setegid(gid))
++ _exit(2);
++ }
++
++
++ if (uid && (uid != geteuid())) {
++ if (seteuid(uid))
++ _exit(2);
++ }
++
+ while (fgets(line, LINE_MAX, fp) != NULL) {
+ if ((linepnt = strchr(line, '\n')) != NULL) {
+ *linepnt = 0;
+@@ -39,7 +56,8 @@ int doit(unsigned char *testlogin, unsig
+ break;
+ }
+ }
+- fclose(fp);
++
++ if (EOF == fclose(fp)) _exit(2);
+
+ if (!found_user) return(1);
+
diff --git a/net-mail/cmd5checkpw/files/poppasswd b/net-mail/cmd5checkpw/files/poppasswd
new file mode 100644
index 000000000000..8fc1d4275ecd
--- /dev/null
+++ b/net-mail/cmd5checkpw/files/poppasswd
@@ -0,0 +1,3 @@
+# Format of this file is one user:pass per line
+# Like so...
+# joedogger:sm311yf33t
diff --git a/net-mail/cmd5checkpw/files/reloc.diff b/net-mail/cmd5checkpw/files/reloc.diff
new file mode 100644
index 000000000000..7472436bf469
--- /dev/null
+++ b/net-mail/cmd5checkpw/files/reloc.diff
@@ -0,0 +1,63 @@
+diff -upr cmd5checkpw-0.30.orig/Makefile cmd5checkpw-0.30/Makefile
+--- cmd5checkpw-0.30.orig/Makefile 2003-09-18 16:34:01.000000000 +0300
++++ cmd5checkpw-0.30/Makefile 2005-07-31 14:41:16.000000000 +0300
+@@ -14,7 +14,7 @@ CFLAGS=-c -g -Wall -O3
+ LD=gcc
+ LDFLAGS=-g -o ${TARGET}
+
+-default: main man cmd5checkpw
++default: cmd5checkpw
+
+ main: cmd5checkpw.c conf-qmail
+ sed s}QMAILHOME}"`head -1 conf-qmail`"}g cmd5checkpw.c > main.c
+diff -upr cmd5checkpw-0.30.orig/cmd5checkpw.8 cmd5checkpw-0.30/cmd5checkpw.8
+--- cmd5checkpw-0.30.orig/cmd5checkpw.8 2003-09-18 16:34:01.000000000 +0300
++++ cmd5checkpw-0.30/cmd5checkpw.8 2005-07-31 14:43:20.000000000 +0300
+@@ -26,7 +26,7 @@ and a cram-md5 challenge terminated by \
+ .B cmd5checkpw
+ recalcuates a MD5 digest using the provided plain challenge
+ and the passwords from
+-.IR /var/qmail/users/authuser
++.IR /etc/poppasswd
+ and compares it with response (2nd parameter). If they are the same
+ then
+ .B cmd5checkpw
+@@ -50,7 +50,7 @@ exits 111.
+
+ .B cmd5checkpw
+ additionally compares the supplied password with the password in the
+-.IR /var/qmail/user/authuser
++.IR /etc/poppasswd
+ file. Thus it can be used as a plain-text checkpassword
+ for PLAIN & LOGIN authtype (but we recommend using a crypted version for
+ security reasons). To use it, simply provide it with clear text password
+@@ -68,7 +68,7 @@ interface.
+ Before invoking
+ .BR subprogram ,
+ .B cmd5checkpw
+-does not set up anything. Just because users from /var/qmail/user/authuser does not
++does not set up anything. Just because users from /etc/poppasswd does not
+ have to exist in the system so setting their uid,gid etc is not possible.
+
+ Other
+@@ -78,7 +78,7 @@ These effects must be documented;
+ applications will differ in their requirements.
+
+ .SH "FILES"
+-.IR /var/qmail/users/authuser
++.IR /etc/poppasswd
+ - this file contains pairs of logins and clear text passwords
+ separated by ":". It looks like this:
+
+diff -upr cmd5checkpw-0.30.orig/main.c cmd5checkpw-0.30/main.c
+--- cmd5checkpw-0.30.orig/main.c 2003-09-18 16:34:01.000000000 +0300
++++ cmd5checkpw-0.30/main.c 2005-07-31 14:43:36.000000000 +0300
+@@ -7,7 +7,7 @@
+ #include <unistd.h>
+
+ #define LINE_MAX 256
+-#define SASLUSERFILE "/var/qmail/users/authuser"
++#define SASLUSERFILE "/etc/poppasswd"
+ #define READONLY "r"
+ char up[513];
+ int uplen;
diff --git a/net-mail/cmd5checkpw/metadata.xml b/net-mail/cmd5checkpw/metadata.xml
new file mode 100644
index 000000000000..0cb478b8c6ca
--- /dev/null
+++ b/net-mail/cmd5checkpw/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qmail</herd>
+</pkgmetadata>