[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
https://bugs.exim.org/show_bug.cgi?id=1007 --- Comment #11 from Git Commit--- Git commit: https://git.exim.org/exim.git/commitdiff/d3e58fcb87faf7131a2712fcfaef200ffd191f05 commit d3e58fcb87faf7131a2712fcfaef200ffd191f05 Author: Jeremy Harris AuthorDate: Fri Mar 30 22:54:55 2018 +0100 Commit: Jeremy Harris CommitDate: Fri Mar 30 23:58:45 2018 +0100 avoid doing logging in signal-handlers. bug 1007 doc/doc-docbook/spec.xfpt | 7 +- doc/doc-txt/ChangeLog | 9 +++ src/src/config.h.defaults | 1 + src/src/expand.c | 2 + src/src/functions.h | 4 + src/src/globals.c | 6 ++ src/src/globals.h | 6 ++ src/src/readconf.c| 2 + src/src/receive.c | 201 ++ src/src/smtp_in.c | 82 ++- src/src/spool_in.c| 4 + src/src/spool_out.c | 6 +- src/src/tls-gnu.c | 20 +++-- src/src/tls-openssl.c | 11 ++- test/confs/0001 | 1 - test/stderr/0465 | 2 - test/stderr/0471 | 2 - test/stderr/0487 | 2 - test/stderr/0489 | 16 test/stderr/0575 | 2 - test/stderr/2600 | 2 - test/stderr/2610 | 2 - test/stderr/2620 | 2 - test/stderr/5004 | 2 - test/stderr/5005 | 8 -- test/stderr/5006 | 2 - test/stdout/0574 | 2 - 27 files changed, 246 insertions(+), 160 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
https://bugs.exim.org/show_bug.cgi?id=1007 Git Commitchanged: What|Removed |Added CC||g...@exim.org --- Comment #10 from Git Commit --- Git commit: https://git.exim.org/exim.git/commitdiff/9723f9667322bf96db786fa49d53139a48fabc5e commit 9723f9667322bf96db786fa49d53139a48fabc5e Author: Jeremy Harris AuthorDate: Fri Mar 30 22:54:55 2018 +0100 Commit: Jeremy Harris CommitDate: Sun Apr 15 17:24:40 2018 +0100 avoid doing logging in signal-handlers. bug 1007 doc/doc-docbook/spec.xfpt | 7 +- doc/doc-txt/ChangeLog | 7 ++ src/src/config.h.defaults | 1 + src/src/expand.c | 2 + src/src/functions.h | 4 + src/src/globals.c | 6 ++ src/src/globals.h | 6 ++ src/src/local_scan.c | 1 + src/src/readconf.c| 2 + src/src/receive.c | 201 ++ src/src/smtp_in.c | 82 ++- src/src/spool_in.c| 4 + src/src/spool_out.c | 6 +- src/src/tls-gnu.c | 20 +++-- src/src/tls-openssl.c | 11 ++- test/confs/0001 | 1 - test/stderr/0022 | 6 -- test/stderr/0275 | 2 - test/stderr/0278 | 2 - test/stderr/0294 | 4 - test/stderr/0303 | 4 - test/stderr/0317 | 4 - test/stderr/0361 | 2 - test/stderr/0371 | 2 - test/stderr/0386 | 4 - test/stderr/0388 | 2 - test/stderr/0402 | 2 - test/stderr/0403 | 2 - test/stderr/0404 | 4 - test/stderr/0408 | 2 - test/stderr/0465 | 2 - test/stderr/0471 | 2 - test/stderr/0487 | 2 - test/stderr/0489 | 16 test/stderr/0575 | 2 - test/stderr/2600 | 2 - test/stderr/2610 | 2 - test/stderr/2620 | 2 - test/stderr/5004 | 2 - test/stderr/5005 | 8 -- test/stderr/5006 | 2 - test/stdout/0574 | 2 - 42 files changed, 245 insertions(+), 202 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
https://bugs.exim.org/show_bug.cgi?id=1007 Jeremy Harrischanged: What|Removed |Added Target Milestone|Exim 4.77 |Exim_4.92+ -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
https://bugs.exim.org/show_bug.cgi?id=1007 Jeremy Harrischanged: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #9 from Jeremy Harris --- Fixed by d3e58fcb87; nobody commented. -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
https://bugs.exim.org/show_bug.cgi?id=1007 Jeremy Harrischanged: What|Removed |Added Assignee|p...@exim.org|jgh146...@wizmail.org Status|REOPENED|ASSIGNED -- You are receiving this mail because: You are on the CC list for the bug. -- ## List details at https://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
--- You are receiving this mail because: --- You are on the CC list for the bug. http://bugs.exim.org/show_bug.cgi?id=1007 --- Comment #6 from Christof Meerwald cme...@cmeerw.org 2010-07-12 06:39:24 --- I guess the safest thing to do would be not trying to convert the timestamp in the signal handler, but just write the raw time_t value to the process-info file and let exiwhat do the formatting. -- Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email -- ## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
--- You are receiving this mail because: --- You are on the CC list for the bug. http://bugs.exim.org/show_bug.cgi?id=1007 --- Comment #4 from Christof Meerwald cme...@cmeerw.org 2010-07-11 10:32:01 --- I guess the main problem with the patch is that it doesn't fix anything at all. localtime_r/gmtime_r are no more or less async-signal-safe than localtime/gmtime (as a quick look at the link I had posted would have confirmed - or alternatively, a look at the glibc source code). But as I also mentioned, there are more problems with the signal handler code, like using the global log_buffer or closing the log files in the signal handler. Being a bit less arrogant would perhaps have helped you here... -- Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email -- ## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
--- You are receiving this mail because: --- You are on the CC list for the bug. http://bugs.exim.org/show_bug.cgi?id=1007 --- Comment #3 from Phil Pennock p...@exim.org 2010-07-11 08:42:34 --- Created an attachment (id=397) -- (http://bugs.exim.org/attachment.cgi?id=397) Proposed fix for reentrancy in signal handler How does this look to people? Git commit: http://git.exim.org/users/pdp/exim.git/commit/4a5fece04de463b3127e600fc8ca5e7c6a384b6e -- Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email -- ## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
--- You are receiving this mail because: --- You are on the CC list for the bug. http://bugs.exim.org/show_bug.cgi?id=1007 Christof Meerwald cme...@cmeerw.org changed: What|Removed |Added CC||cme...@cmeerw.org --- Comment #1 from Christof Meerwald cme...@cmeerw.org 2010-07-08 22:38:42 --- It's not just the localtime that's a problem - signal handlers should only use async-signal-safe functions, see http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html for a list of signal-safe-functions. -- Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email -- ## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[exim-dev] [Bug 1007] tod_stamp uses non-reentrant localtime()
--- You are receiving this mail because: --- You are on the CC list for the bug. http://bugs.exim.org/show_bug.cgi?id=1007 --- Comment #2 from Phil Pennock p...@exim.org 2010-07-09 03:15:09 --- Thank you, but we do know that, as does anyone who has programmed a POSIX environment for any time. Exim generally avoids doing work in signal handlers and is very cautious about what it does do, mostly using only its own functions. Normally, there's an alarm handler, a child handler and the USR1 glue. A little less time showing off that you've learnt a factoid and a little more time looking at what the code does would perhaps have helped you here. In this case, there's an oversight which has led to a race from signal handlers for the support code for a tool normally only invoked by administrators. It will be fixed. -- Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email -- ## List details at http://lists.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##