[exim-dev] [Bug 1454] Adding option -oMm to supply message r…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Todd Lyons
Date:  
À: exim-dev
Sujet: [exim-dev] [Bug 1454] Adding option -oMm to supply message reference
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1454




--- Comment #6 from Todd Lyons <tlyons@???> 2014-04-25 17:12:54 ---
Issue 1: A better way to handle it is to increment it going into the if, which
then has the side effect of

-        if (trusted_config && mac_ismsgid(argv[i+1]) )
-          message_reference = argv[++i];
+        if (trusted_config && mac_ismsgid(argv[++i]) )
+          message_reference = argv[i];


Issue 2: If you cannot find the debug output, we must be trying to use the
debug_printf too early. I didn't notice it, but when you look in that
function, all other error output uses fprintf to stderr, so we should here too.

-          DEBUG(D_any) debug_printf("-oMm must be a valid message ID, called
by a trusted user/config\n");
+          fprintf(stderr,"-oMm must be a valid message ID, called by a trusted
user/config\n");



Thanks for catching those two things.

We may also want to consider adding an exit after the fprintf. If the
reference value passed in is not valid, we need to consider all other possible
applications for this. On one hand I think it would be better to print the
error and abort, but on the other hand we've already ignored that invalid
message id, so no invalid data will get logged (that could screw up message
auditing).

+          exit(EXIT_FAILURE);


Can you please test the change for the two issues above and let me know the
results? Also, please voice an opinion about the potential exit().


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email