pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

opensmtpd: remove, imported in the main tree.



Module Name:	pkgsrc-wip
Committed By:	Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By:	vms
Date:		Sat Aug 26 13:00:23 2023 +0200
Changeset:	472d909e2f2e98d214472f23530e266fb77e2472

Removed Files:
	opensmtpd/DESCR
	opensmtpd/MESSAGE
	opensmtpd/Makefile
	opensmtpd/PLIST.common
	opensmtpd/PLIST.nowrap
	opensmtpd/README
	opensmtpd/TODO
	opensmtpd/distinfo
	opensmtpd/files/README.pkgsrc
	opensmtpd/files/mailer.conf
	opensmtpd/files/opensmtpd.sh
	opensmtpd/files/smtp.conf
	opensmtpd/options.mk
	opensmtpd/patches/patch-contrib_libexec_mail.local_mail.local.c
	opensmtpd/patches/patch-mk_smtpd_Makefile.am
	opensmtpd/patches/patch-openbsd-compat_getpeereid.c
	opensmtpd/patches/patch-openbsd-compat_imsg-buffer.c
	opensmtpd/patches/patch-openbsd-compat_imsg.c
	opensmtpd/patches/patch-usr.sbin_smtpd_proxy.c
	opensmtpd/patches/patch-usr.sbin_smtpd_queue__fs.c
	opensmtpd/patches/patch-usr.sbin_smtpd_smtp__session.c

Log Message:
opensmtpd: remove, imported in the main tree.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=472d909e2f2e98d214472f23530e266fb77e2472

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 opensmtpd/DESCR                                    |  10 --
 opensmtpd/MESSAGE                                  |   8 --
 opensmtpd/Makefile                                 | 119 ---------------------
 opensmtpd/PLIST.common                             |  34 ------
 opensmtpd/PLIST.nowrap                             |   5 -
 opensmtpd/README                                   |   1 -
 opensmtpd/TODO                                     |  17 ---
 opensmtpd/distinfo                                 |  13 ---
 opensmtpd/files/README.pkgsrc                      |  14 ---
 opensmtpd/files/mailer.conf                        |   9 --
 opensmtpd/files/opensmtpd.sh                       |  42 --------
 opensmtpd/files/smtp.conf                          |  16 ---
 opensmtpd/options.mk                               |  72 -------------
 .../patch-contrib_libexec_mail.local_mail.local.c  |  15 ---
 opensmtpd/patches/patch-mk_smtpd_Makefile.am       |  31 ------
 .../patches/patch-openbsd-compat_getpeereid.c      |  18 ----
 .../patches/patch-openbsd-compat_imsg-buffer.c     |  22 ----
 opensmtpd/patches/patch-openbsd-compat_imsg.c      |  22 ----
 opensmtpd/patches/patch-usr.sbin_smtpd_proxy.c     |  32 ------
 opensmtpd/patches/patch-usr.sbin_smtpd_queue__fs.c |  24 -----
 .../patches/patch-usr.sbin_smtpd_smtp__session.c   |  64 -----------
 21 files changed, 588 deletions(-)

diffs:
diff --git a/opensmtpd/DESCR b/opensmtpd/DESCR
deleted file mode 100644
index 5588b3e2b6..0000000000
--- a/opensmtpd/DESCR
+++ /dev/null
@@ -1,10 +0,0 @@
-OpenSMTPD is a FREE implementation of the server-side SMTP protocol
-as defined by RFC 5321, with some additional standard extensions.
-It allows ordinary machines to exchange e-mails with other systems
-speaking the SMTP protocol.
-
-Started out of dissatisfaction with other implementations, OpenSMTPD
-nowadays is a fairly complete SMTP implementation.
-
-OpenSMTPD is primarily developed by Gilles Chehade, Eric Faurot and
-Charles Longeau; with contributions from various OpenBSD hackers.
diff --git a/opensmtpd/MESSAGE b/opensmtpd/MESSAGE
deleted file mode 100644
index 4f7d090e38..0000000000
--- a/opensmtpd/MESSAGE
+++ /dev/null
@@ -1,8 +0,0 @@
-===========================================================================
-$NetBSD$
-
-Sample configuration files have been installed at ${PKG_SYSCONFDIR}/smtpd.
-
-Check the README available at ${DOCDIR}.
-
-===========================================================================
diff --git a/opensmtpd/Makefile b/opensmtpd/Makefile
deleted file mode 100644
index 94f16a1318..0000000000
--- a/opensmtpd/Makefile
+++ /dev/null
@@ -1,119 +0,0 @@
-# $NetBSD$
-
-VERSION=	7.3.0p1
-DISTNAME=	opensmtpd-${VERSION}
-CATEGORIES=	mail net
-MASTER_SITES=	https://www.opensmtpd.org/archives/
-
-MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	https://www.opensmtpd.org/
-COMMENT=	The OpenSMTPD mail transfer agent, a replacement for sendmail
-LICENSE=	isc AND modified-bsd AND 2-clause-bsd
-
-BUILD_DEFS+=	VARBASE
-
-USE_LIBTOOL=	yes
-USE_TOOLS+=	awk pkg-config yacc
-USE_TOOLS+=	automake aclocal autoheader autoconf
-
-DEPENDS+=	mozilla-rootcerts-[0-9]*:../../security/mozilla-rootcerts
-
-PLIST_SRC=	PLIST.common
-
-CFLAGS.SunOS+=	-D__EXTENSIONS__
-
-PKG_GROUPS=		_smtpd _smtpq
-PKG_USERS=		_smtpd:_smtpd _smtpq:_smtpq
-PKG_GECOS._smtpd=	OpenSMTPD pseudo-user
-PKG_HOME._smtpd=	${SMTPD_HOME}
-PKG_GECOS._smtpq=	OpenSMTPD pseudo-user
-PKG_HOME._smtpq=	${SMTPD_HOME}
-
-.include "../../mk/bsd.prefs.mk"
-
-GNU_CONFIGURE=		yes
-USE_DB185=		yes
-CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}/smtpd
-CONFIGURE_ARGS+=	--with-mantype=man
-CONFIGURE_ARGS+=	--with-libssl=${SSLBASE:Q}
-CONFIGURE_ARGS+=	--with-path-CAfile=${SSLCERTS}/ca-certificates.crt
-CONFIGURE_ARGS+=	--with-path-empty=${VARBASE}/empty
-.if ${OPSYS} == "Linux"
-CONFIGURE_ARGS+=	--with-path-mbox=${VARBASE}/spool/mail
-.else
-CONFIGURE_ARGS+=	--with-path-mbox=${VARBASE}/mail
-.endif
-CONFIGURE_ARGS+=	--with-libevent=${BUILDLINK_PREFIX.libevent}
-#CONFIGURE_ARGS+=	--with-bundled-libtls	# required for OpenSSL 3+
-CONFIGURE_ARGS+=	--with-table-db
-CONFIGURE_ARGS+=	--with-pie
-
-.include "options.mk"
-
-EGDIR=		${PREFIX}/share/examples/opensmtpd
-DOCDIR=		${PREFIX}/share/doc/opensmtpd
-CONF_FILES+=	${EGDIR}/smtpd.conf ${PKG_SYSCONFDIR}/smtpd/smtpd.conf
-CONF_FILES+=	${EGDIR}/aliases ${PKG_SYSCONFDIR}/smtpd/aliases
-
-OWN_DIRS+=	${VARBASE}/chroot/smtpd
-OWN_DIRS+=	${PKG_SYSCONFDIR}/smtpd
-MAKE_DIRS+=	${VARBASE}/empty ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0700
-
-INSTALLATION_DIRS+=	share/examples/${PKGBASE}
-INSTALLATION_DIRS+=	share/doc/${PKGBASE}
-
-RCD_SCRIPTS=	opensmtpd
-
-SETUID_ROOT_PERMS?=	${REAL_ROOT_USER} _smtpq 2555
-SPECIAL_PERMS+=		sbin/smtpctl ${SETUID_ROOT_PERMS}
-
-SUBST_CLASSES+=		pkgsrc
-SUBST_STAGE.pkgsrc=	pre-configure
-SUBST_FILES.pkgsrc=	mailer.conf README.pkgsrc
-SUBST_VARS.pkgsrc=	PKG_SYSCONFDIR PREFIX RCD_SCRIPTS_DIR
-SUBST_MESSAGE.pkgsrc=	Replacing pkgsrc placeholders.
-
-SUBST_CLASSES+=		paths
-SUBST_STAGE.paths=	pre-configure
-SUBST_MESSAGE.paths=	Fixing hard-coded paths.
-SUBST_FILES.paths+=	mk/smtpd/Makefile.am usr.sbin/smtpd/smtpd.conf	\
-			usr.sbin/smtpd/smtpd.8 usr.sbin/smtpd/smtpd.conf.5 \
-			usr.sbin/smtpd/aliases.5 usr.sbin/smtpd/makemap.8 \
-			usr.sbin/smtpd/newaliases.8
-SUBST_SED.paths+=	-e "s:/etc/mail:${PKG_SYSCONFDIR}/smtpd:g"
-SUBST_SED.paths+=	-e "s:/usr/local/etc:${PKG_SYSCONFDIR}/smtpd:g"
-SUBST_SED.paths+=	-e "s:@EXAMPLE_DIR@:${EGDIR}:g"
-SUBST_SED.paths+=	-e "s:/etc/ssl:${SSLDIR}:g"
-
-MESSAGE_SUBST+=		DOCDIR=${DOCDIR:Q}
-
-post-extract:
-.for f in mailer.conf README.pkgsrc
-	cp ${FILESDIR}/${f} ${WRKSRC}
-.endfor
-
-pre-configure:
-	cd ${WRKSRC} && ${PREFIX}/bin/libtoolize --copy --force
-	cd ${WRKSRC} && ${TOOLS_CMD.aclocal}
-	cd ${WRKSRC} && ${TOOLS_CMD.autoconf}
-	cd ${WRKSRC} && ${TOOLS_CMD.autoheader}
-	cd ${WRKSRC} && ${TOOLS_CMD.automake} --foreign --add-missing --copy
-
-.PHONY: doc-install
-doc-install:
-	${INSTALL_DATA} ${WRKSRC}/etc/aliases ${DESTDIR}${EGDIR}
-	${INSTALL_DATA} ${WRKSRC}/README.pkgsrc ${DESTDIR}${DOCDIR}
-
-.if ${OPSYS} == "Linux"
-.  include "../../devel/libbsd/buildlink3.mk"
-.endif
-.include "../../databases/db5/buildlink3.mk"
-.include "../../devel/libevent/buildlink3.mk"
-.include "../../devel/zlib/buildlink3.mk"
-.include "../../net/libasr/buildlink3.mk"
-# OpenSSL 3+ may require building with bundled libtls
-# instead of pkgsrc LibreTLS
-#.include "../../security/openssl/buildlink3.mk"
-.include "../../security/libretls/buildlink3.mk"
-.include "../../mk/dlopen.buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/opensmtpd/PLIST.common b/opensmtpd/PLIST.common
deleted file mode 100644
index 815a79f7a2..0000000000
--- a/opensmtpd/PLIST.common
+++ /dev/null
@@ -1,34 +0,0 @@
-@comment $NetBSD$
-bin/smtp
-libexec/opensmtpd/encrypt
-libexec/opensmtpd/lockspool
-libexec/opensmtpd/mail.lmtp
-libexec/opensmtpd/mail.local
-libexec/opensmtpd/mail.maildir
-libexec/opensmtpd/mail.mboxfile
-libexec/opensmtpd/mail.mda
-${PLIST.mailwrapper}libexec/opensmtpd/makemap
-man/man1/lockspool.1
-man/man1/smtp.1
-man/man5/aliases.5
-man/man5/forward.5
-man/man5/smtpd.conf.5
-man/man5/table.5
-man/man7/smtpd-filters.7
-man/man8/mail.lmtp.8
-man/man8/mail.local.8
-man/man8/mail.maildir.8
-man/man8/mail.mboxfile.8
-man/man8/mail.mda.8
-man/man8/makemap.8
-man/man8/newaliases.8
-man/man8/sendmail.8
-man/man8/smtpctl.8
-man/man8/smtpd.8
-sbin/smtpctl
-sbin/smtpd
-share/doc/opensmtpd/README.pkgsrc
-share/examples/opensmtpd/aliases
-${PLIST.mailwrapper}share/examples/opensmtpd/mailer.conf
-${PLIST.pam}share/examples/opensmtpd/pam.d/smtp
-share/examples/opensmtpd/smtpd.conf
diff --git a/opensmtpd/PLIST.nowrap b/opensmtpd/PLIST.nowrap
deleted file mode 100644
index 35893da9c9..0000000000
--- a/opensmtpd/PLIST.nowrap
+++ /dev/null
@@ -1,5 +0,0 @@
-@comment $NetBSD$
-sbin/mailq
-sbin/makemap
-sbin/newaliases
-sbin/sendmail
diff --git a/opensmtpd/README b/opensmtpd/README
deleted file mode 100644
index 47b0c45af9..0000000000
--- a/opensmtpd/README
+++ /dev/null
@@ -1 +0,0 @@
-This package is intended as update for mail/opensmtpd.
diff --git a/opensmtpd/TODO b/opensmtpd/TODO
deleted file mode 100644
index 2d16ea66b8..0000000000
--- a/opensmtpd/TODO
+++ /dev/null
@@ -1,17 +0,0 @@
-[X] Modify patches for release 6.7.1p1
-    - Patch for "mk/makemap/Makefile.am" removed (file no longer exists)
-    - Patch for "smtpd/queue_fs.c" removed
-      Use of statfs() is now guarded by "#ifdef __OpenBSD__"
-    - Patch for "smtpd/smtp_session.c" reduced
-      The buffersize for "username" was already increased upstream
-[X] Update PLIST
-    Binaries with sendmail names are no longer installed
-[X] Check CONFLICTS
-    Maybe some can be removed after sendmail binaries are no longer installed
-[X] Remove BROKEN_FOR_PLATFORM
-    - OpenBSD-*-* (not tested yet)
-[X] CVE-2023-29323 is fixed upstream as of OpenSMTPD version 7.0.0-portable
-[X] Write a README.pkgsrc
-[ ] Switch to bundled-libtls if OpenSSL3 is imported and LibreTLS
-    doesn't get a fix in the meantime. See:
-    https://github.com/OpenSMTPD/OpenSMTPD/pull/1208
diff --git a/opensmtpd/distinfo b/opensmtpd/distinfo
deleted file mode 100644
index 702d1d43f5..0000000000
--- a/opensmtpd/distinfo
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: distinfo,v 1.6 2016/06/01 11:47:06 wiz Exp $
-
-BLAKE2s (opensmtpd-7.3.0p1.tar.gz) = 0b2b46d52ae98647cb952d175b718b5bbb13c407cbde997a5d3350099227ccc2
-SHA512 (opensmtpd-7.3.0p1.tar.gz) = 2106de43e4b7435e49df759570ec758672ca8271dc451e30a261c250b41908b6ffe28e571a5f52e2ac14f59af132d1df45b272f8fcafeab04fcfb6bd5db970bb
-Size (opensmtpd-7.3.0p1.tar.gz) = 849026 bytes
-SHA1 (patch-contrib_libexec_mail.local_mail.local.c) = bec19540fa52c7c6596ab5923f3a67b334ddf168
-SHA1 (patch-mk_smtpd_Makefile.am) = cc3f82922e3e56bc0205085f7e311f2beeda7fc4
-SHA1 (patch-openbsd-compat_getpeereid.c) = 8d60140bffcabb6accf9b7bbe0f419c2c25d352d
-SHA1 (patch-openbsd-compat_imsg-buffer.c) = 4b6861eec3461a192e20aa2daba4d74bd2659339
-SHA1 (patch-openbsd-compat_imsg.c) = 762b2ae2362716947ea007fa229e9e31fa6d08f3
-SHA1 (patch-usr.sbin_smtpd_proxy.c) = 895d3e9532bf53dcdb7a52825043acacac51b378
-SHA1 (patch-usr.sbin_smtpd_queue__fs.c) = f40d5be4c05d8d54f7368af8d20f4ee007860dc7
-SHA1 (patch-usr.sbin_smtpd_smtp__session.c) = 565b1df1a6d4d3c5ee786f4501c1cd73992f2d3e
diff --git a/opensmtpd/files/README.pkgsrc b/opensmtpd/files/README.pkgsrc
deleted file mode 100644
index a02a538133..0000000000
--- a/opensmtpd/files/README.pkgsrc
+++ /dev/null
@@ -1,14 +0,0 @@
-Getting started
-===============
-
-Assuming NetBSD-style mailwrapper(8) and rc(8), few steps are required
-to set up OpenSMTPD for local and outbound delivery on your system: 
-
-* Run `$ @RCD_SCRIPTS_DIR@/postfix stop' and set postfix=NO in /etc/rc.conf.
-* Replace /etc/mailer.conf with @PREFIX@/share/examples/opensmtpd/mailer.conf.
-* Prepend @PREFIX@/man to the MANPATH environment to avoid conflicting
-  names for man pages with sendmail-compatible mail servers.
-* Check the smptd.conf and aliases files in @PKG_SYSCONFDIR@/smtpd. See 
-  relevant man pages.
-* Set opensmtpd=YES in /etc/rc.conf.  
-* Run `@RCD_SCRIPTS_DIR@/opensmtpd start' to start OpenSMTPD.
diff --git a/opensmtpd/files/mailer.conf b/opensmtpd/files/mailer.conf
deleted file mode 100644
index 287925bf1f..0000000000
--- a/opensmtpd/files/mailer.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-#	$NetBSD: mailer.conf,v 1.2 2016/05/01 05:56:40 mef Exp $
-#
-# Use "opensmtpd" replacements 
-#
-sendmail	@PREFIX@/sbin/smtpctl
-send-mail	@PREFIX@/sbin/smtpctl
-mailq		@PREFIX@/sbin/smtpctl
-makemap		@PREFIX@/sbin/smptctl
-newaliases	@PREFIX@/sbin/smtpctl
diff --git a/opensmtpd/files/opensmtpd.sh b/opensmtpd/files/opensmtpd.sh
deleted file mode 100644
index d1e9be4962..0000000000
--- a/opensmtpd/files/opensmtpd.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-#
-# $NetBSD: opensmtpd.sh,v 1.1 2013/11/18 22:50:01 pettai Exp $
-#
-
-# PROVIDE: smtpd mail
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-#       we make mail start late, so that things like .forward's are not
-#       processed until the system is fully operational
-
-$_rc_subr_loaded . @SYSCONFBASE@/rc.subr
-
-name="smtpd"
-rcvar=opensmtpd
-
-: ${smtpd_config:="@PKG_SYSCONFDIR@/smtpd/${name}.conf"}
-: ${smtpd_server:="@PREFIX@/sbin/${name}"}
-: ${smtpd_flags:=""}
-
-command="${smtpd_server}"
-command_args="-f ${smtpd_config} -v"
-required_files="${smtpd_config}"
-pidfile="@VARBASE@/run/${name}.pid"
-
-start_precmd="smtpd_precmd"
-check_cmd="smtpd_check"
-extra_commands="check"
-
-smtpd_check()
-{
-	echo "Performing sanity check on smtpd configuration:"
-	eval ${command} ${command_args} ${smtpd_flags} -n
-}
-
-smtpd_precmd()
-{
-	smtpd_check
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/opensmtpd/files/smtp.conf b/opensmtpd/files/smtp.conf
deleted file mode 100644
index 33dd209efe..0000000000
--- a/opensmtpd/files/smtp.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# PAM configuration for the "smtp" service
-#
-
-# auth
-auth		required	pam_nologin.so		no_warn
-auth		include		system
-
-# account
-account		include		system
-
-# password
-password	include		system
-
-# session
-session		include		system
diff --git a/opensmtpd/options.mk b/opensmtpd/options.mk
deleted file mode 100644
index 2e88bf0a4f..0000000000
--- a/opensmtpd/options.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-# $NetBSD: options.mk,v 1.2 2023/02/23 19:10:06 vins Exp $
-
-PKG_OPTIONS_VAR=	PKG_OPTIONS.opensmtpd
-
-PKG_SUPPORTED_OPTIONS=	mailwrapper pam
-
-.if ${OPSYS} != "OpenBSD"
-PKG_SUGGESTED_OPTIONS+=	pam
-.endif
-
-.if exists(/etc/mailer.conf) || exists(/etc/mail/mailer.conf) || exists(${PKG_SYSCONFDIR}/mailer.conf)
-PKG_SUGGESTED_OPTIONS+=	mailwrapper
-.endif
-
-PLIST_VARS+=		mailwrapper pam
-
-.include "../../mk/bsd.options.mk"
-
-#
-# PAM support
-#
-.if !empty(PKG_OPTIONS:Mpam)
-.  include "../../mk/pam.buildlink3.mk"
-
-CONFIGURE_ARGS+=	--with-auth-pam=smtp
-
-EGDIR=			${PREFIX}/share/examples/${PKGBASE}
-CONF_FILES+=		${EGDIR}/pam.d/smtp \
-			${PKG_SYSCONFDIR}/pam.d/smtp
-
-MAKE_DIRS+=		${PKG_SYSCONFDIR}/pam.d
-INSTALLATION_DIRS+=	share/examples/${PKGBASE}/pam.d
-
-PLIST.pam=		yes
-
-.PHONY:	pam-install
-
-pam-install:
-	${INSTALL_DATA} ${FILESDIR}/smtp.conf	\
-		${DESTDIR}${EGDIR}/pam.d/smtp
-.endif
-
-#
-# MTA symlinks
-# Create the appriopriate symbolic links to `smtpctl' if mailwrapper is
-# unavailable. This is done to accomodate clients that require historical
-# interfaces such as sendmail, newaliases or makemap.
-# The smtpctl utility can operate in compatibility mode if called with
-# the historical name.
-#
-.if !empty(PKG_OPTIONS:Mmailwrapper)
-post-install: doc-install pam-install
-	${INSTALL_DATA} ${WRKSRC}/mailer.conf \
-		${DESTDIR}${EGDIR}/mailer.conf
-	${RUN}${LN} -sf ${PREFIX}/sbin/smtpctl \
-		${DESTDIR}${PREFIX}/libexec/opensmtpd/makemap
-
-PLIST.mailwrapper=	yes
-
-.else
-
-CONFLICTS+=	courier-mta-[0-9]* fastforward>=0.51nb2 sendmail-[0-9]*
-CONFLICTS+=	esmtp>=1.2 nullmailer-[0-9]* postfix-[0-9]* qmail-[0-9]*
-
-post-install: doc-install pam-install
-.  for i in mailq makemap newaliases sendmail
-	${RUN}${LN} -sf ${PREFIX}/sbin/smtpctl	\
-		${DESTDIR}${PREFIX}/sbin/${i}
-.  endfor
-
-PLIST_SRC+=	PLIST.nowrap
-.endif
diff --git a/opensmtpd/patches/patch-contrib_libexec_mail.local_mail.local.c b/opensmtpd/patches/patch-contrib_libexec_mail.local_mail.local.c
deleted file mode 100644
index 115edee3fd..0000000000
--- a/opensmtpd/patches/patch-contrib_libexec_mail.local_mail.local.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Initialize variable to silence warning.
-
---- contrib/libexec/mail.local/mail.local.c.orig	2020-05-21 19:06:04.000000000 +0000
-+++ contrib/libexec/mail.local/mail.local.c
-@@ -288,7 +288,7 @@ void
- notifybiff(char *msg)
- {
- 	static struct addrinfo *res0;
--	struct addrinfo hints, *res;
-+	struct addrinfo hints, *res = NULL;
- 	static int f = -1;
- 	size_t len;
- 	int error;
diff --git a/opensmtpd/patches/patch-mk_smtpd_Makefile.am b/opensmtpd/patches/patch-mk_smtpd_Makefile.am
deleted file mode 100644
index 2e47858c28..0000000000
--- a/opensmtpd/patches/patch-mk_smtpd_Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
-Install the configuration file in the example directory.
-
---- mk/smtpd/Makefile.am.orig	2023-06-27 14:04:37.000000000 +0000
-+++ mk/smtpd/Makefile.am
-@@ -164,19 +164,17 @@ $(CONFIGFILES): $(CONFIGFILES_IN)
- 
- # smtpd.conf
- # newaliases makemap
-+
-+EXAMPLE_DIR=@EXAMPLE_DIR@
-+
- install-exec-hook: $(CONFIGFILES) $(MANPAGES)
--	$(MKDIR_P) $(DESTDIR)$(sysconfdir)
-+	$(MKDIR_P) $(DESTDIR)$(EXAMPLE_DIR)
- 	$(MKDIR_P) $(DESTDIR)$(bindir)
- 	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
- 	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)7
- 	$(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
- 
--	@if [ ! -f $(DESTDIR)$(sysconfdir)/smtpd.conf ]; then			\
--		$(INSTALL) -m 644 smtpd.conf.out $(DESTDIR)$(sysconfdir)/smtpd.conf; \
--	else									\
--		echo "$(DESTDIR)$(sysconfdir)/smtpd.conf already exists, install will not overwrite"; \
--	fi
--
-+	$(INSTALL) -m 644 smtpd.conf.out	$(DESTDIR)$(EXAMPLE_DIR)/smtpd.conf
- 	$(INSTALL) -m 644 aliases.5.out		$(DESTDIR)$(mandir)/$(mansubdir)5/aliases.5
- 	$(INSTALL) -m 644 forward.5.out		$(DESTDIR)$(mandir)/$(mansubdir)5/forward.5
- 	$(INSTALL) -m 644 table.5.out		$(DESTDIR)$(mandir)/$(mansubdir)5/table.5
diff --git a/opensmtpd/patches/patch-openbsd-compat_getpeereid.c b/opensmtpd/patches/patch-openbsd-compat_getpeereid.c
deleted file mode 100644
index 5b2b612d51..0000000000
--- a/opensmtpd/patches/patch-openbsd-compat_getpeereid.c
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD$
-
-Silence warnings.
-
---- openbsd-compat/getpeereid.c.orig	2020-05-21 19:06:04.000000000 +0000
-+++ openbsd-compat/getpeereid.c
-@@ -48,9 +48,9 @@ getpeereid(int s, uid_t *euid, gid_t *gi
- 
- 	if (getpeerucred(s, &ucred) == -1)
- 		return (-1);
--	if ((*euid = ucred_geteuid(ucred)) == -1)
-+	if ((*euid = ucred_geteuid(ucred)) == (uid_t)-1)
- 		return (-1);
--	if ((*gid = ucred_getrgid(ucred)) == -1)
-+	if ((*gid = ucred_getrgid(ucred)) == (gid_t)-1)
- 		return (-1);
- 
- 	ucred_free(ucred);
diff --git a/opensmtpd/patches/patch-openbsd-compat_imsg-buffer.c b/opensmtpd/patches/patch-openbsd-compat_imsg-buffer.c
deleted file mode 100644
index b791f4faac..0000000000
--- a/opensmtpd/patches/patch-openbsd-compat_imsg-buffer.c
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
-Fix build on SmartOS
-
---- openbsd-compat/imsg-buffer.c.orig	2023-06-27 14:04:38.000000000 +0000
-+++ openbsd-compat/imsg-buffer.c
-@@ -16,6 +16,15 @@
-  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-  */
- 
-+/* needed for CMSG_* functions on SunOS */
-+#if defined(__sun)
-+#if (__STDC_VERSION__ - 0 < 199901L)
-+#define _XOPEN_SOURCE 500
-+#else
-+#define _XOPEN_SOURCE 600
-+#endif
-+#endif
-+
- #include "includes.h"
- 
- #include <sys/types.h>
diff --git a/opensmtpd/patches/patch-openbsd-compat_imsg.c b/opensmtpd/patches/patch-openbsd-compat_imsg.c
deleted file mode 100644
index b9a1b9f820..0000000000
--- a/opensmtpd/patches/patch-openbsd-compat_imsg.c
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
-Fix build on SmartOS
-
---- openbsd-compat/imsg.c.orig	2023-06-27 14:04:38.000000000 +0000
-+++ openbsd-compat/imsg.c
-@@ -16,6 +16,15 @@
-  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-  */
- 
-+/* needed for CMSG_* functions on SunOS */
-+#if defined(__sun)
-+#if (__STDC_VERSION__ - 0 < 199901L)
-+#define _XOPEN_SOURCE 500
-+#else
-+#define _XOPEN_SOURCE 600
-+#endif
-+#endif
-+
- #include "includes.h"
- 
- #include <sys/types.h>
diff --git a/opensmtpd/patches/patch-usr.sbin_smtpd_proxy.c b/opensmtpd/patches/patch-usr.sbin_smtpd_proxy.c
deleted file mode 100644
index 93689a01ed..0000000000
--- a/opensmtpd/patches/patch-usr.sbin_smtpd_proxy.c
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD$
-
-Rename local variables to avoid name clash on SmartOS.
-
---- usr.sbin/smtpd/proxy.c.orig	2020-05-21 19:06:04.000000000 +0000
-+++ usr.sbin/smtpd/proxy.c
-@@ -341,7 +341,7 @@ proxy_translate_ss(struct proxy_session
- {
- 	struct sockaddr_in *sin = (struct sockaddr_in *) &s->ss;
- 	struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &s->ss;
--	struct sockaddr_un *sun = (struct sockaddr_un *) &s->ss;
-+	struct sockaddr_un *lsun = (struct sockaddr_un *) &s->ss;
- 	size_t sun_len;
- 
- 	switch (s->hdr.fam) {
-@@ -370,13 +370,13 @@ proxy_translate_ss(struct proxy_session
- 		memset(&s->ss, 0, sizeof(s->ss));
- 		sun_len = strnlen(s->addr.un.src_addr,
- 		    sizeof(s->addr.un.src_addr));
--		if (sun_len > sizeof(sun->sun_path)) {
-+		if (sun_len > sizeof(lsun->sun_path)) {
- 			proxy_error(s, "address translation", "Unix socket path"
- 			    " longer than supported");
- 			return (-1);
- 		}
--		sun->sun_family = AF_UNIX;
--		memcpy(sun->sun_path, s->addr.un.src_addr, sun_len);
-+		lsun->sun_family = AF_UNIX;
-+		memcpy(lsun->sun_path, s->addr.un.src_addr, sun_len);
- 		break;
- 
- 	default:
diff --git a/opensmtpd/patches/patch-usr.sbin_smtpd_queue__fs.c b/opensmtpd/patches/patch-usr.sbin_smtpd_queue__fs.c
deleted file mode 100644
index 810c3aac1e..0000000000
--- a/opensmtpd/patches/patch-usr.sbin_smtpd_queue__fs.c
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD$
-
-Fix build on DragonFly
-
---- usr.sbin/smtpd/queue_fs.c.orig	2020-12-24 13:42:14.000000000 +0000
-+++ usr.sbin/smtpd/queue_fs.c
-@@ -16,6 +16,17 @@
-  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-  */
- 
-+#ifdef __DragonFly__
-+#include <sys/queue.h>
-+/*
-+ * XXX: the openbsd-compat/sys/queue.h intercepts <sys/queue.h> and our
-+ * <sys/mount.h> needs "STAILQ_ENTRY(vfsconf) vfc_next;".
-+ */
-+#ifndef STAILQ_ENTRY
-+#define STAILQ_ENTRY(type) struct { struct type *stqe_next; /* next element */ }
-+#endif
-+#endif
-+
- #include "includes.h"
- 
- #include <sys/types.h>
diff --git a/opensmtpd/patches/patch-usr.sbin_smtpd_smtp__session.c b/opensmtpd/patches/patch-usr.sbin_smtpd_smtp__session.c
deleted file mode 100644
index af2df30103..0000000000
--- a/opensmtpd/patches/patch-usr.sbin_smtpd_smtp__session.c
+++ /dev/null
@@ -1,64 +0,0 @@
-$NetBSD$
-
-Add a patch to handle long usernames during SMTP authentication,
-e.g. often username exceeds the limit when it contains @host.name
-part.
-
-From FreeBSD's ports.
-
-cf.http://svnweb.freebsd.org/ports?view=revision&revision=394424
-
-For update 6.7.1p1:
-Removed hunk to increase buffersize to LOGIN_NAME_MAX+HOST_NAME_MAX+1,
-this was already increased upstream to SMTPD_MAXMAILADDRSIZE.
-
---- usr.sbin/smtpd/smtp_session.c.orig	2020-05-21 19:06:04.000000000 +0000
-+++ usr.sbin/smtpd/smtp_session.c
-@@ -84,6 +84,7 @@ enum {
- 	TX_ERROR_ENVELOPE,
- 	TX_ERROR_SIZE,
- 	TX_ERROR_IO,
-+	SF_USERTOOLONG		= 0x0400,
- 	TX_ERROR_LOOP,
- 	TX_ERROR_MALFORMED,
- 	TX_ERROR_RESOURCES,
-@@ -970,6 +971,15 @@ smtp_session_imsg(struct mproc *p, struc
- 
- 		s = tree_xpop(&wait_parent_auth, reqid);
- 		strnvis(user, s->username, sizeof user, VIS_WHITE | VIS_SAFE);
-+
-+		if (s->flags & SF_USERTOOLONG) {
-+			log_info("smtp-in: sesson %016"PRIx64
-+				": auth failed because username too long",
-+				s->id);
-+			s->flags &= (~SF_USERTOOLONG);
-+			success = LKA_PERMFAIL;
-+		}
-+
- 		if (success == LKA_OK) {
- 			log_info("%016"PRIx64" smtp "
- 			    "authentication user=%s "
-@@ -1967,7 +1977,7 @@ smtp_rfc4954_auth_plain(struct smtp_sess
- 		user++; /* skip NUL */
- 		if (strlcpy(s->username, user, sizeof(s->username))
- 		    >= sizeof(s->username))
--			goto abort;
-+			s->flags |= SF_USERTOOLONG;
- 
- 		pass = memchr(user, '\0', len - (user - buf));
- 		if (pass == NULL || pass >= buf + len - 2)
-@@ -2011,9 +2021,12 @@ smtp_rfc4954_auth_login(struct smtp_sess
- 
- 	case STATE_AUTH_USERNAME:
- 		memset(s->username, 0, sizeof(s->username));
--		if (base64_decode(arg, (unsigned char *)s->username,
--				  sizeof(s->username) - 1) == -1)
-+		if (base64_decode(arg, (unsigned char *)buf,
-+				  sizeof(buf) - 1) == -1)
- 			goto abort;
-+		if (strlcpy(s->username, buf, sizeof(s->username))
-+		    >= sizeof(s->username))
-+			s->flags |= SF_USERTOOLONG;
- 
- 		smtp_enter_state(s, STATE_AUTH_PASSWORD);
- 		smtp_reply(s, "334 UGFzc3dvcmQ6");


Home | Main Index | Thread Index | Old Index