summary refs log tree commit diff
path: root/pkgs/tools/networking
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-09-18 10:01:00 +0100
committerGitHub <noreply@github.com>2018-09-18 10:01:00 +0100
commitbaa8dc35d559deda3301edec10ebd77325f91f2d (patch)
treef7f56bb60efc3b753bc199f5928322d9b8bd5826 /pkgs/tools/networking
parent874b045cc891e45f7e391a9fca16aa69b45320ff (diff)
parent6d97096d8bf999edf8f1eff36a5577c2ae536e45 (diff)
downloadnixpkgs-baa8dc35d559deda3301edec10ebd77325f91f2d.tar
nixpkgs-baa8dc35d559deda3301edec10ebd77325f91f2d.tar.gz
nixpkgs-baa8dc35d559deda3301edec10ebd77325f91f2d.tar.bz2
nixpkgs-baa8dc35d559deda3301edec10ebd77325f91f2d.tar.lz
nixpkgs-baa8dc35d559deda3301edec10ebd77325f91f2d.tar.xz
nixpkgs-baa8dc35d559deda3301edec10ebd77325f91f2d.tar.zst
nixpkgs-baa8dc35d559deda3301edec10ebd77325f91f2d.zip
Merge pull request #46736 from clefru/mpack
mpack: Invoke /run/wrappers/bin/sendmail via execvp
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r--pkgs/tools/networking/mpack/default.nix7
-rw-r--r--pkgs/tools/networking/mpack/sendmail-via-execvp.diff12
2 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/tools/networking/mpack/default.nix b/pkgs/tools/networking/mpack/default.nix
index 62cec7c41ee..5a8af7de36a 100644
--- a/pkgs/tools/networking/mpack/default.nix
+++ b/pkgs/tools/networking/mpack/default.nix
@@ -8,18 +8,13 @@ stdenv.mkDerivation rec {
     sha256 = "0k590z96509k96zxmhv72gkwhrlf55jkmyqlzi72m61r7axhhh97";
   };
 
-  patches = [ ./build-fix.patch ];
+  patches = [ ./build-fix.patch ./sendmail-via-execvp.diff ];
 
   postPatch = ''
     for f in *.{c,man,pl,unix} ; do
       substituteInPlace $f --replace /usr/tmp /tmp
     done
 
-    for f in unixpk.c ; do
-      substituteInPlace $f \
-        --replace /usr/sbin /run/current-system/sw/bin
-    done
-
     # this just shuts up some warnings
     for f in {decode,encode,part,unixos,unixpk,unixunpk,xmalloc}.c ; do
       sed -i 'i#include <stdlib.h>' $f
diff --git a/pkgs/tools/networking/mpack/sendmail-via-execvp.diff b/pkgs/tools/networking/mpack/sendmail-via-execvp.diff
new file mode 100644
index 00000000000..8f10901038d
--- /dev/null
+++ b/pkgs/tools/networking/mpack/sendmail-via-execvp.diff
@@ -0,0 +1,12 @@
+--- mpack-1.6/unixpk.c	2003-07-21 22:50:41.000000000 +0200
++++ mpack-1.6/unixpk.c	2018-09-16 12:57:14.104026964 +0200
+@@ -254,8 +254,9 @@
+ #ifdef SCO
+     execv("/usr/lib/mail/execmail", addr+start);
+ #else
++    execvp("sendmail", addr+start);
+     execv("/usr/lib/sendmail", addr+start);
+     execv("/usr/sbin/sendmail", addr+start);
+ #endif
+     perror("execv");
+     _exit(1);