| 1 | From 47a48ed569503d8730bafcfd0f96d27cb72c9454 Mon Sep 17 00:00:00 2001 |
| 2 | From: "Heiko Schlittermann (HS12-RIPE)" <hs@schlittermann.de> |
| 3 | Date: Sat, 1 May 2021 11:21:22 +0200 |
| 4 | Subject: [PATCH 27/29] testsuite: adjustments for CVE-2020-28014, |
| 5 | CVE-2021-27216 (Arbitrary PID file creation) |
| 6 | |
| 7 | --- |
| 8 | src/daemon.c | 32 -------------------------------- |
| 9 | test/stderr/0433 | 24 ------------------------ |
| 10 | 2 files changed, 56 deletions(-) |
| 11 | |
| 12 | diff --git a/src/daemon.c b/src/daemon.c |
| 13 | index 9403472f3..7c15d148c 100644 |
| 14 | --- a/src/daemon.c |
| 15 | +++ b/src/daemon.c |
| 16 | @@ -1044,38 +1044,6 @@ exim_exit(EXIT_SUCCESS, US""); |
| 17 | } |
| 18 | |
| 19 | |
| 20 | -/* Called by the daemon; exec a child to get the pid file deleted |
| 21 | -since we may require privs for the containing directory */ |
| 22 | - |
| 23 | -static void |
| 24 | -daemon_die(void) |
| 25 | -{ |
| 26 | -int pid; |
| 27 | - |
| 28 | -DEBUG(D_any) debug_printf("SIGTERM/SIGINT seen\n"); |
| 29 | -#if defined(SUPPORT_TLS) && (defined(EXIM_HAVE_INOTIFY) || defined(EXIM_HAVE_KEVENT)) |
| 30 | -tls_watch_invalidate(); |
| 31 | -#endif |
| 32 | - |
| 33 | -if (f.running_in_test_harness || write_pid) |
| 34 | - { |
| 35 | - if ((pid = fork()) == 0) |
| 36 | - { |
| 37 | - if (override_pid_file_path) |
| 38 | - (void)child_exec_exim(CEE_EXEC_PANIC, FALSE, NULL, FALSE, 3, |
| 39 | - "-oP", override_pid_file_path, "-oPX"); |
| 40 | - else |
| 41 | - (void)child_exec_exim(CEE_EXEC_PANIC, FALSE, NULL, FALSE, 1, "-oPX"); |
| 42 | - |
| 43 | - /* Control never returns here. */ |
| 44 | - } |
| 45 | - if (pid > 0) |
| 46 | - child_close(pid, 1); |
| 47 | - } |
| 48 | -exim_exit(EXIT_SUCCESS, US""); |
| 49 | -} |
| 50 | - |
| 51 | - |
| 52 | |
| 53 | /************************************************* |
| 54 | * Exim Daemon Mainline * |
| 55 | -- |
| 56 | 2.30.2 |
| 57 | |