update to postgrey-1.37

This commit is contained in:
sthen 2019-08-31 15:55:55 +00:00
parent 267f1f46d9
commit 4636cac0e0
4 changed files with 21 additions and 43 deletions

View File

@ -1,12 +1,11 @@
# $OpenBSD: Makefile,v 1.24 2019/07/17 14:46:33 danj Exp $
# $OpenBSD: Makefile,v 1.25 2019/08/31 15:55:55 sthen Exp $
COMMENT= postfix greylist daemon
DISTNAME= postgrey-1.35
DISTNAME= postgrey-1.37
CATEGORIES= mail
REVISION= 2
HOMEPAGE= http://postgrey.schweikert.ch/
HOMEPAGE= https://postgrey.schweikert.ch/
MASTER_SITES= ${HOMEPAGE}/pub/ \
${HOMEPAGE}/pub/old/
@ -14,8 +13,10 @@ MASTER_SITES= ${HOMEPAGE}/pub/ \
# GPLv2
PERMIT_PACKAGE= Yes
NO_BUILD= Yes
NO_TEST= Yes
NO_BUILD= Yes
# tests need more work
NO_TEST= Yes
BUILD_DEPENDS= ${RUN_DEPENDS}
RUN_DEPENDS= devel/p5-Net-Server \

View File

@ -1,2 +1,2 @@
SHA256 (postgrey-1.35.tar.gz) = 9qaVZjCAPm956/9q0MwNRroyBG7WzCYOOOb1kd57vc8=
SIZE (postgrey-1.35.tar.gz) = 36610
SHA256 (postgrey-1.37.tar.gz) = /02VQ/j1ywNWww/+IiVdlCrGEo2nNMN23iEcAmMPpfc=
SIZE (postgrey-1.37.tar.gz) = 41815

View File

@ -1,44 +1,21 @@
# $OpenBSD: patch-postgrey,v 1.6 2014/08/19 13:54:56 giovanni Exp $
# $OpenBSD: patch-postgrey,v 1.7 2019/08/31 15:55:55 sthen Exp $
default path/uid/gid changes, plus untaint for Perl 5.18
From 9673b54064691a5b9c295ffea340d8a1f9ee1cb8 Mon Sep 17 00:00:00 2001
From: Yasuhiro KIMURA <yasu@utahime.org>
Date: Sat, 17 Aug 2013 22:05:27 +0900
Subject: [PATCH] Make postgrey work with Perl 5.18
--- postgrey.orig Wed Jun 11 15:13:50 2014
+++ postgrey Sat Jul 12 17:18:21 2014
@@ -23,7 +23,7 @@ use vars qw(@ISA);
Index: postgrey
--- postgrey.orig
+++ postgrey
@@ -24,7 +24,7 @@ use vars qw(@ISA);
@ISA = qw(Net::Server::Multiplex);
my $VERSION = '1.35';
my $VERSION = '1.37';
-my $DEFAULT_DBDIR = '/var/spool/postfix/postgrey';
+my $DEFAULT_DBDIR = '/var/db/postgrey';
my $CONFIG_DIR = '/etc/postfix';
sub cidr_parse($)
@@ -551,6 +551,16 @@ sub main()
" followed by 'h' for hours ('6h' for example).\n";
}
}
+ # untaint what is given on --pidfile. It is not security sensitive since
+ # it is provided by the admin
+ if($opt{pidfile}) {
+ $opt{pidfile} =~ /^(.*)$/; $opt{pidfile} = $1;
+ }
+ # untaint what is given on --inet. It is not security sensitive since
+ # it is provided by the admin
+ if($opt{inet}) {
+ $opt{inet} =~ /^(.*)$/; $opt{inet} = $1;
+ }
# untaint what is given on --dbdir. It is not security sensitive since
# it is provided by the admin
@@ -595,8 +605,8 @@ sub main()
commandline => [ 'postgrey', @ARGV_saved ],
sub read_clients_whitelists($)
@@ -598,8 +598,8 @@ sub main()
port => [ $opt{inet} ? $opt{inet} : $opt{unix}."|unix" ],
proto => $opt{inet} ? 'tcp' : 'unix',
socketmode => $opt{socketmode} || '0666',
- user => $opt{user} || 'postgrey',
- group => $opt{group} || 'nogroup',
+ user => $opt{user} || '_postgrey',
@ -46,7 +23,7 @@ Subject: [PATCH] Make postgrey work with Perl 5.18
dbdir => $opt{dbdir} || $DEFAULT_DBDIR,
setsid => $opt{daemonize} ? 1 : undef,
pid_file => $opt{daemonize} ? $opt{pidfile} : undef,
@@ -804,9 +814,9 @@ B<postgrey> [I<options>...]
@@ -810,9 +810,9 @@ B<postgrey> [I<options>...]
-i, --inet=[HOST:]PORT listen on PORT, localhost if HOST is not specified
-d, --daemonize run in the background
--pidfile=PATH put daemon pid into this file

View File

@ -1,6 +1,7 @@
@comment $OpenBSD: PLIST,v 1.5 2011/05/06 08:40:06 sthen Exp $
@comment $OpenBSD: PLIST,v 1.6 2019/08/31 15:55:55 sthen Exp $
@newgroup _postgrey:563
@newuser _postgrey:563:563:daemon:Postgrey Daemon:/var/empty:/sbin/nologin
@rcscript ${RCDIR}/postgrey
libexec/postgrey
@man man/man1/postgrey.1
@mode 0755
@ -17,4 +18,3 @@ share/examples/postgrey/postgrey_whitelist_clients
@sample ${SYSCONFDIR}/postfix/postgrey_whitelist_clients
share/examples/postgrey/postgrey_whitelist_recipients
@sample ${SYSCONFDIR}/postfix/postgrey_whitelist_recipients
@rcscript ${RCDIR}/postgrey