opensmtpd: 5.7.3p2 -> 5.9.2p1
This commit is contained in:
parent
cc41cb30e3
commit
e69ed2b64b
@ -107,7 +107,16 @@ in {
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
wants = [ "network.target" ];
|
wants = [ "network.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
preStart = "mkdir -p /var/spool";
|
preStart = ''
|
||||||
|
mkdir -p /var/spool/smtpd
|
||||||
|
|
||||||
|
mkdir -p /var/spool/smtpd/offline
|
||||||
|
chown root.smtpq /var/spool/smtpd/offline
|
||||||
|
chmod 770 /var/spool/smtpd/offline
|
||||||
|
|
||||||
|
mkdir -p /var/spool/smtpd/purge
|
||||||
|
chmod 700 /var/spool/smtpd/purge
|
||||||
|
'';
|
||||||
serviceConfig.ExecStart = "${opensmtpd}/sbin/smtpd -d -f ${conf} ${args}";
|
serviceConfig.ExecStart = "${opensmtpd}/sbin/smtpd -d -f ${conf} ${args}";
|
||||||
environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/opensmtpd";
|
environment.OPENSMTPD_PROC_PATH = "${procEnv}/libexec/opensmtpd";
|
||||||
};
|
};
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
{ stdenv, fetchurl, autoconf, automake, libtool, bison
|
{ stdenv, fetchurl, autoconf, automake, libtool, bison
|
||||||
, libasr, libevent, zlib, openssl, db, pam, cacert
|
, libasr, libevent, zlib, openssl, db, pam
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "opensmtpd-${version}";
|
name = "opensmtpd-${version}";
|
||||||
version = "5.7.3p2";
|
version = "5.9.2p1";
|
||||||
|
|
||||||
nativeBuildInputs = [ autoconf automake libtool bison ];
|
nativeBuildInputs = [ autoconf automake libtool bison ];
|
||||||
buildInputs = [ libasr libevent zlib openssl db pam ];
|
buildInputs = [ libasr libevent zlib openssl db pam ];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://www.opensmtpd.org/archives/${name}.tar.gz";
|
url = "http://www.opensmtpd.org/archives/${name}.tar.gz";
|
||||||
sha256 = "0d2973008d0f66bebb84bed516be6c32617735241cc54dd26643529281a8e52b";
|
sha256 = "07d7f1m5sxyz6mkk228rcm7fsf7350994ayvmhgph333q5rz48im";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./proc_path.diff ];
|
patches = [ ./proc_path.diff ];
|
||||||
@ -23,8 +23,9 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-pam"
|
"--with-pam"
|
||||||
"--without-bsd-auth"
|
"--without-bsd-auth"
|
||||||
"--with-sock-dir=/run"
|
"--with-sock-dir=/run"
|
||||||
"--with-privsep-user=smtpd"
|
"--with-user-smtpd=smtpd"
|
||||||
"--with-queue-user=smtpq"
|
"--with-user-queue=smtpq"
|
||||||
|
"--with-group-queue=smtpq"
|
||||||
"--with-ca-file=/etc/ssl/certs/ca-certificates.crt"
|
"--with-ca-file=/etc/ssl/certs/ca-certificates.crt"
|
||||||
"--with-libevent-dir=${libevent.dev}"
|
"--with-libevent-dir=${libevent.dev}"
|
||||||
"--enable-table-db"
|
"--enable-table-db"
|
||||||
@ -35,14 +36,14 @@ stdenv.mkDerivation rec {
|
|||||||
"localstatedir=\${TMPDIR}"
|
"localstatedir=\${TMPDIR}"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
homepage = https://www.opensmtpd.org/;
|
homepage = https://www.opensmtpd.org/;
|
||||||
description = ''
|
description = ''
|
||||||
A free implementation of the server-side SMTP protocol as defined by
|
A free implementation of the server-side SMTP protocol as defined by
|
||||||
RFC 5321, with some additional standard extensions
|
RFC 5321, with some additional standard extensions
|
||||||
'';
|
'';
|
||||||
license = stdenv.lib.licenses.isc;
|
license = licenses.isc;
|
||||||
platforms = stdenv.lib.platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = [ stdenv.lib.maintainers.rickynils ];
|
maintainers = with maintainers; [ rickynils obadz ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
diff -Naur opensmtpd-5.7.1p1/smtpd/parse.y opensmtpd-5.7.1p1.patched/smtpd/parse.y
|
diff --git a/smtpd/parse.y b/smtpd/parse.y
|
||||||
--- opensmtpd-5.7.1p1/smtpd/parse.y 2015-06-30 10:13:34.000000000 +0200
|
index ab02719..c1c77d9 100644
|
||||||
+++ opensmtpd-5.7.1p1.patched/smtpd/parse.y 2015-09-26 08:41:17.012472516 +0200
|
--- a/smtpd/parse.y
|
||||||
@@ -2519,13 +2519,19 @@
|
+++ b/smtpd/parse.y
|
||||||
|
@@ -2534,13 +2534,19 @@ create_filter_proc(char *name, char *prog)
|
||||||
{
|
{
|
||||||
struct filter_conf *f;
|
struct filter_conf *f;
|
||||||
char *path;
|
char *path;
|
||||||
@ -22,10 +23,11 @@ diff -Naur opensmtpd-5.7.1p1/smtpd/parse.y opensmtpd-5.7.1p1.patched/smtpd/parse
|
|||||||
yyerror("filter \"%s\" asprintf failed", name);
|
yyerror("filter \"%s\" asprintf failed", name);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
diff -Naur opensmtpd-5.7.1p1/smtpd/smtpd.c opensmtpd-5.7.1p1.patched/smtpd/smtpd.c
|
diff --git a/smtpd/smtpd.c b/smtpd/smtpd.c
|
||||||
--- opensmtpd-5.7.1p1/smtpd/smtpd.c 2015-06-30 10:13:34.000000000 +0200
|
index afc8891..9b0a80f 100644
|
||||||
+++ opensmtpd-5.7.1p1.patched/smtpd/smtpd.c 2015-09-26 08:41:16.998472557 +0200
|
--- a/smtpd/smtpd.c
|
||||||
@@ -854,6 +854,7 @@
|
+++ b/smtpd/smtpd.c
|
||||||
|
@@ -795,6 +795,7 @@ fork_proc_backend(const char *key, const char *conf, const char *procname)
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
char name[PATH_MAX];
|
char name[PATH_MAX];
|
||||||
char *arg;
|
char *arg;
|
||||||
@ -33,7 +35,7 @@ diff -Naur opensmtpd-5.7.1p1/smtpd/smtpd.c opensmtpd-5.7.1p1.patched/smtpd/smtpd
|
|||||||
|
|
||||||
if (strlcpy(name, conf, sizeof(name)) >= sizeof(name)) {
|
if (strlcpy(name, conf, sizeof(name)) >= sizeof(name)) {
|
||||||
log_warnx("warn: %s-proc: conf too long", key);
|
log_warnx("warn: %s-proc: conf too long", key);
|
||||||
@@ -864,7 +865,12 @@
|
@@ -805,7 +806,12 @@ fork_proc_backend(const char *key, const char *conf, const char *procname)
|
||||||
if (arg)
|
if (arg)
|
||||||
*arg++ = '\0';
|
*arg++ = '\0';
|
||||||
|
|
||||||
@ -47,10 +49,11 @@ diff -Naur opensmtpd-5.7.1p1/smtpd/smtpd.c opensmtpd-5.7.1p1.patched/smtpd/smtpd
|
|||||||
(ssize_t)sizeof(path)) {
|
(ssize_t)sizeof(path)) {
|
||||||
log_warn("warn: %s-proc: exec path too long", key);
|
log_warn("warn: %s-proc: exec path too long", key);
|
||||||
return (-1);
|
return (-1);
|
||||||
diff -Naur opensmtpd-5.7.1p1/smtpd/table.c opensmtpd-5.7.1p1.patched/smtpd/table.c
|
diff --git a/smtpd/table.c b/smtpd/table.c
|
||||||
--- opensmtpd-5.7.1p1/smtpd/table.c 2015-06-30 10:13:34.000000000 +0200
|
index 21ee237..95b5164 100644
|
||||||
+++ opensmtpd-5.7.1p1.patched/smtpd/table.c 2015-09-26 08:41:17.005472536 +0200
|
--- a/smtpd/table.c
|
||||||
@@ -201,6 +201,7 @@
|
+++ b/smtpd/table.c
|
||||||
|
@@ -193,6 +193,7 @@ table_create(const char *backend, const char *name, const char *tag,
|
||||||
struct table_backend *tb;
|
struct table_backend *tb;
|
||||||
char buf[LINE_MAX];
|
char buf[LINE_MAX];
|
||||||
char path[LINE_MAX];
|
char path[LINE_MAX];
|
||||||
@ -58,7 +61,7 @@ diff -Naur opensmtpd-5.7.1p1/smtpd/table.c opensmtpd-5.7.1p1.patched/smtpd/table
|
|||||||
size_t n;
|
size_t n;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
@@ -215,8 +216,14 @@
|
@@ -207,11 +208,16 @@ table_create(const char *backend, const char *name, const char *tag,
|
||||||
if (name && table_find(name, NULL))
|
if (name && table_find(name, NULL))
|
||||||
fatalx("table_create: table \"%s\" already defined", name);
|
fatalx("table_create: table \"%s\" already defined", name);
|
||||||
|
|
||||||
@ -68,9 +71,14 @@ diff -Naur opensmtpd-5.7.1p1/smtpd/table.c opensmtpd-5.7.1p1.patched/smtpd/table
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
if ((tb = table_backend_lookup(backend)) == NULL) {
|
if ((tb = table_backend_lookup(backend)) == NULL) {
|
||||||
- if ((size_t)snprintf(path, sizeof(path), PATH_LIBEXEC "/table-%s",
|
- if ((size_t)snprintf(path, sizeof(path), PATH_LIBEXEC"/table-%s",
|
||||||
|
- backend) >= sizeof(path)) {
|
||||||
|
- fatalx("table_create: path too long \""
|
||||||
|
- PATH_LIBEXEC"/table-%s\"", backend);
|
||||||
+ if ((size_t)snprintf(path, sizeof(path), "%s/table-%s",
|
+ if ((size_t)snprintf(path, sizeof(path), "%s/table-%s",
|
||||||
+ proc_path,
|
+ proc_path, backend) >= sizeof(path)) {
|
||||||
backend) >= sizeof(path)) {
|
+ fatalx("table_create: path too long \"%s/table-%s\"",
|
||||||
fatalx("table_create: path too long \""
|
+ proc_path, backend);
|
||||||
PATH_LIBEXEC "/table-%s\"", backend);
|
}
|
||||||
|
if (stat(path, &sb) == 0) {
|
||||||
|
tb = table_backend_lookup("proc");
|
||||||
|
Loading…
Reference in New Issue
Block a user