net-mail/cmd5checkpw: treeclean

Closes: https://bugs.gentoo.org/657438
Closes: https://bugs.gentoo.org/833292
Closes: https://bugs.gentoo.org/334981
Closes: https://bugs.gentoo.org/721236
Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>
This commit is contained in:
Jakov Smolić
2022-12-20 17:20:30 +01:00
parent e127c6f10d
commit 5fb2f02da4
8 changed files with 0 additions and 252 deletions

View File

@@ -1 +0,0 @@
DIST cmd5checkpw-0.30.tar.gz 25812 BLAKE2B d1ef48edd2ff0d88823656915a04a8f0893840a49022ed977c6d178cf70d179c44504512ad44d94ae33d48e523ae8cb98ff7b87357b6c8deee761ae9df163bc5 SHA512 c54792769097ac7e8a11c6a140a9eefdb090bad4a0336be9543549a232e4faa72f08baea7e746b9743e01ce40c0f7402f4584c53b5eedb3f2d1e457d1c8a45d5

View File

@@ -1,65 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fixheadtails
MY_VER=$(ver_rs 1- "")
DESCRIPTION="A checkpassword compatible authentication program using CRAM-MD5"
SRC_URI="https://www.fehcom.de/qmail/auth/${PN}-${MY_VER}_tgz.bin -> ${P}.tar.gz"
HOMEPAGE="https://www.fehcom.de/qmail/smtpauth.html"
LICENSE="public-domain RSA"
SLOT="0"
KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
IUSE=""
DEPEND="acct-user/cmd5checkpw"
RDEPEND="${DEPEND}"
pkg_setup() {
if has_version "<net-mail/cmd5checkpw-0.30"; then
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
fi
}
PATCHES=(
"${FILESDIR}"/euid_${MY_VER}.diff
"${FILESDIR}"/reloc.diff
)
src_prepare() {
default
ht_fix_file Makefile
}
src_compile() {
emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -o cmd5checkpw"
}
src_install() {
insinto /etc
insopts -m 400 -o cmd5checkpw
doins "${FILESDIR}"/poppasswd
exeinto /usr/bin
exeopts -o cmd5checkpw -m 4755
doexe cmd5checkpw
doman cmd5checkpw.8
einstalldocs
}
pkg_postinst() {
chmod 400 "${EROOT}"/etc/poppasswd || die
chown cmd5checkpw "${EROOT}"/etc/poppasswd || die
}

View File

@@ -1,65 +0,0 @@
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit fixheadtails
MY_VER=$(ver_rs 1- "")
DESCRIPTION="A checkpassword compatible authentication program using CRAM-MD5"
SRC_URI="https://www.fehcom.de/qmail/auth/${PN}-${MY_VER}_tgz.bin -> ${P}.tar.gz"
HOMEPAGE="https://www.fehcom.de/qmail/smtpauth.html"
LICENSE="public-domain RSA"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE=""
DEPEND="acct-group/cmd5checkpw"
RDEPEND="${DEPEND}"
pkg_setup() {
if has_version "<net-mail/cmd5checkpw-0.30"; then
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
fi
}
PATCHES=(
"${FILESDIR}"/euid_${MY_VER}.diff
"${FILESDIR}"/reloc.diff
)
src_prepare() {
default
ht_fix_file Makefile
}
src_compile() {
emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS} -o cmd5checkpw"
}
src_install() {
insinto /etc
insopts -m 640 -o root -g cmd5checkpw
doins "${FILESDIR}"/poppasswd
exeinto /usr/bin
exeopts -o root -g cmd5checkpw -m 2755
doexe cmd5checkpw
doman cmd5checkpw.8
einstalldocs
}
pkg_postinst() {
chmod 640 "${EROOT}"/etc/poppasswd || die
chown root:cmd5checkpw "${EROOT}"/etc/poppasswd || die
}

View File

@@ -1,49 +0,0 @@
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);

View File

@@ -1,3 +0,0 @@
# Format of this file is one user:pass per line
# Like so...
# joedogger:sm311yf33t

View File

@@ -1,63 +0,0 @@
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;

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
</pkgmetadata>

View File

@@ -564,7 +564,6 @@ dev-erlang/riakc
dev-util/stubgen
media-gfx/xzgv
net-dns/dnssec-check
net-mail/cmd5checkpw
# Jonas Stein <jstein@gentoo.org> (2022-11-13)
# Dead upstream