summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Richard Narron2019-08-29 16:37:24 +0200
committer Willy Sudiarto Raharjo2019-08-29 16:37:24 +0200
commitcae0cdfc48f4f6e5882823d848112c56d38a29b6 (patch)
tree1192a4c49faa6ca8931dfca91c799114e93cd96a
parentfaf5b05f211ceb715b5698a3d7d270a569c9e856 (diff)
downloadslackbuilds-cae0cdfc48f4f6e5882823d848112c56d38a29b6.tar.gz
network/opensmtpd: Fix bug.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--network/opensmtpd/README12
-rw-r--r--network/opensmtpd/fix-crash-on-authentication.patch43
-rw-r--r--network/opensmtpd/opensmtpd.SlackBuild7
3 files changed, 56 insertions, 6 deletions
diff --git a/network/opensmtpd/README b/network/opensmtpd/README
index bbd1b2606f..39e7203c20 100644
--- a/network/opensmtpd/README
+++ b/network/opensmtpd/README
@@ -19,8 +19,12 @@ This package conflicts with the stock sendmail package included in
Slackware and overwrites some of its files, so remove the sendmail
package before installing opensmtpd.
-In the change from version 5.7.3p2 to 5.9.2p1 the ownership and permissions
-changed for the /var/spool/offline directory
+Alpine hangs when sending mail using the opensmtp sendmail command and the
+opensmtpd server is down.
+
+To prevent this, modify the /etc/pine.conf or the user .pinerc to
+send the mail directly to the server instead of using the
+opensmtpd sendmail command:
+
+ smtp-server=localhost
- chown -R root:smtpq /var/spool/offline
- chmod 770 /var/spool/offline
diff --git a/network/opensmtpd/fix-crash-on-authentication.patch b/network/opensmtpd/fix-crash-on-authentication.patch
new file mode 100644
index 0000000000..c20b5e0a0e
--- /dev/null
+++ b/network/opensmtpd/fix-crash-on-authentication.patch
@@ -0,0 +1,43 @@
+From 9b5f70b93e038df5446bd37a4adac5a0380748e7 Mon Sep 17 00:00:00 2001
+From: johannes <johannes.brechtmann@gmail.com>
+Date: Wed, 21 Feb 2018 23:57:11 +0100
+Subject: [PATCH] crypt_checkpass: include HAVE_CRYPT_H definition, add NULL
+ check
+
+---
+ openbsd-compat/crypt_checkpass.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/openbsd-compat/crypt_checkpass.c b/openbsd-compat/crypt_checkpass.c
+index dafd2dae..d10b3a57 100644
+--- a/openbsd-compat/crypt_checkpass.c
++++ b/openbsd-compat/crypt_checkpass.c
+@@ -1,5 +1,6 @@
+ /* OPENBSD ORIGINAL: lib/libc/crypt/cryptutil.c */
+
++#include "includes.h"
+ #include <errno.h>
+ #ifdef HAVE_CRYPT_H
+ #include <crypt.h>
+@@ -10,6 +11,8 @@
+ int
+ crypt_checkpass(const char *pass, const char *goodhash)
+ {
++ char *c;
++
+ if (goodhash == NULL)
+ goto fail;
+
+@@ -17,7 +20,11 @@ crypt_checkpass(const char *pass, const char *goodhash)
+ if (strlen(goodhash) == 0 && strlen(pass) == 0)
+ return 0;
+
+- if (strcmp(crypt(pass, goodhash), goodhash) == 0)
++ c = crypt(pass, goodhash);
++ if (c == NULL)
++ goto fail;
++
++ if (strcmp(c, goodhash) == 0)
+ return 0;
+
+ fail:
diff --git a/network/opensmtpd/opensmtpd.SlackBuild b/network/opensmtpd/opensmtpd.SlackBuild
index b429cf360a..d2e54fba71 100644
--- a/network/opensmtpd/opensmtpd.SlackBuild
+++ b/network/opensmtpd/opensmtpd.SlackBuild
@@ -25,7 +25,7 @@
PRGNAM=opensmtpd
VERSION=${VERSION:-6.0.3p1}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -95,6 +95,9 @@ find -L . \
# fix reply buffer overflow
cat $CWD/openbsd64-020-smtpd.patch | patch -p1
+# check null from crypt function
+cat $CWD/fix-crash-on-authentication.patch | patch -p1
+
CFLAGS="$SLKCFLAGS -D_DEFAULT_SOURCE" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -165,7 +168,7 @@ for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; r
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a INSTALL LICENSE README.md THANKS $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.slackware
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install