From 51020076879477a428e319d12d03a9966e808065 Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Sun, 4 Aug 2019 03:31:22 +0100 Subject: [PATCH] test: Adjust docker test to msmtp being a setgid binary The golang image has been updated to use Debian buster. In that version, msmtp is now setgid, which means glibc sanitizes the environment before forking and $HOSTALIASES will be ignored, which breaks the tests. This patch works around the problem by removing the setgid bit from msmtp. --- test/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Dockerfile b/test/Dockerfile index a413e87..c01f4a1 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -34,6 +34,9 @@ RUN apt-get install -y -q sudo RUN mkdir -p test/t-02-exim/.exim4 \ && ln -s /usr/sbin/exim4 test/t-02-exim/.exim4 +# Prepare msmtp: remove setuid, otherwise HOSTALIASES doesn't work. +RUN chmod g-s /usr/bin/msmtp + # Install binaries for the (optional) DKIM integration test. RUN go get github.com/driusan/dkim/... \ && go install github.com/driusan/dkim/cmd/dkimsign \