git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the daemon pid file when exit is due to SIGTERM. Bug 340
[exim.git]
/
src
/
src
/
exim.c
diff --git
a/src/src/exim.c
b/src/src/exim.c
index d6952ef2ef665be4d482626982ce008a1a003fa1..f2943547667f2b50864f4bc666faf57e6490545d 100644
(file)
--- a/
src/src/exim.c
+++ b/
src/src/exim.c
@@
-202,7
+202,7
@@
va_end(ap);
static void
term_handler(int sig)
{
static void
term_handler(int sig)
{
-
exit(1);
+exit(1);
}
}
@@
-3067,11
+3067,15
@@
for (i = 1; i < argc; i++)
else if (Ustrcmp(argrest, "o") == 0) {}
else if (Ustrcmp(argrest, "o") == 0) {}
- /* -oP <name>: set pid file path for daemon */
+ /* -oP <name>: set pid file path for daemon
+ -oPX: delete pid file of daemon */
else if (Ustrcmp(argrest, "P") == 0)
override_pid_file_path = argv[++i];
else if (Ustrcmp(argrest, "P") == 0)
override_pid_file_path = argv[++i];
+ else if (Ustrcmp(argrest, "PX") == 0)
+ delete_pid_file();
+
/* -or <n>: set timeout for non-SMTP acceptance
-os <n>: set timeout for SMTP acceptance */
/* -or <n>: set timeout for non-SMTP acceptance
-os <n>: set timeout for SMTP acceptance */
@@
-4809,8
+4813,9
@@
if (verify_address_mode || f.address_test_mode)
{
while (recipients_arg < argc)
{
{
while (recipients_arg < argc)
{
- uschar *s = argv[recipients_arg++];
- while (*s != 0)
+ /* Supplied addresses are tainted since they come from a user */
+ uschar * s = string_copy_taint(argv[recipients_arg++], TRUE);
+ while (*s)
{
BOOL finished = FALSE;
uschar *ss = parse_find_address_end(s, FALSE);
{
BOOL finished = FALSE;
uschar *ss = parse_find_address_end(s, FALSE);
@@
-4818,16
+4823,16
@@
if (verify_address_mode || f.address_test_mode)
test_address(s, flags, &exit_value);
s = ss;
if (!finished)
test_address(s, flags, &exit_value);
s = ss;
if (!finished)
- while (*
(++s) != 0 && (*s == ',' || isspace(*s)))
;
+ while (*
++s == ',' || isspace(*s))
;
}
}
}
else for (;;)
{
}
}
}
else for (;;)
{
- uschar *s = get_stdinput(NULL, NULL);
- if (
s == NULL
) break;
- test_address(s, flags, &exit_value);
+ uschar *
s = get_stdinput(NULL, NULL);
+ if (
!s
) break;
+ test_address(s
tring_copy_taint(s, TRUE)
, flags, &exit_value);
}
route_tidyup();
}
route_tidyup();
@@
-5321,13
+5326,13
@@
while (more)
raw_sender = string_copy(sender_address);
raw_sender = string_copy(sender_address);
- /* Loop for each argument */
+ /* Loop for each argument
(supplied by user hence tainted)
*/
for (int i = 0; i < count; i++)
{
int start, end, domain;
for (int i = 0; i < count; i++)
{
int start, end, domain;
- uschar *errmess;
- uschar *
s = list[i]
;
+ uschar *
errmess;
+ uschar *
s = string_copy_taint(list[i], TRUE)
;
/* Loop for each comma-separated address */
/* Loop for each comma-separated address */