]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
arpwatch: Fix the envelope sender
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 20 Sep 2025 14:02:01 +0000 (14:02 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 20 Sep 2025 14:02:01 +0000 (14:02 +0000)
arpwatch invokes sendmail without passing the envelope sender
explicitely. This causes that mails can get rejected if the From: header
does not match the envelope sender.

This patch passes the correct address as the envelope sender.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/arpwatch
src/patches/arpwatch/fix-envelope-sender.patch [new file with mode: 0644]

index b4bce7dbb443509966aab9e40c6c9defe7b5596d..1b701cd4f2755dd583319952377a61d869bf5898 100644 (file)
@@ -37,7 +37,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = arpwatch
-PAK_VER    = 1
+PAK_VER    = 2
 
 DEPS       =
 
@@ -97,6 +97,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        # Don't install the initscript
        cd $(DIR_APP) && sed -i '/@HAVE_FREEBSD_TRUE@/d' Makefile.in
 
+       # Fix the envelope sender
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/arpwatch/fix-envelope-sender.patch
+
        # Build!
        cd $(DIR_APP) && ./configure --prefix=/usr
        cd $(DIR_APP) && make $(MAKETUNING)
diff --git a/src/patches/arpwatch/fix-envelope-sender.patch b/src/patches/arpwatch/fix-envelope-sender.patch
new file mode 100644 (file)
index 0000000..3c4a6f9
--- /dev/null
@@ -0,0 +1,11 @@
+--- arpwatch-3.8/report.c~     2025-09-20 13:57:16.351246657 +0000
++++ arpwatch-3.8/report.c      2025-09-20 13:43:47.777995101 +0000
+@@ -390,7 +390,7 @@
+       close(fd);
+       /* Always Deliver interactively (pause when child depth gets large) */
+-      execl(sendmail, "sendmail", "-odi", watcher, NULL);
++      execl(sendmail, "sendmail", "-odi", watcher, "-f", watchee, NULL);
+       lg(LOG_ERR, "execl: %s: %s", sendmail, strerror(errno));
+       exit(1);
+ }