From: Marcela Mašláňová Date: Fri, 5 Jun 2009 12:36:55 +0000 (+0200) Subject: ValidateMailRcpts removed for problems when could be enviromental X-Git-Tag: cronie1.4~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c107e96be21679b6ea64ae4c3df4b894d3f74eed;p=cronie ValidateMailRcpts removed for problems when could be enviromental settings exported under wrong user. --- diff --git a/src/cron.c b/src/cron.c index fea297a..c14aba5 100644 --- a/src/cron.c +++ b/src/cron.c @@ -177,9 +177,6 @@ int main(int argc, char *argv[]) { exit(1); } - if (getenv("CRON_VALIDATE_MAILRCPTS") != 0L) - ValidateMailRcpts = 1; - /* Get the default locale character set for the mail * "Content-Type: ...; charset=" header */ diff --git a/src/do_command.c b/src/do_command.c index 6a73410..b4917a1 100644 --- a/src/do_command.c +++ b/src/do_command.c @@ -369,9 +369,7 @@ static void child_process(entry * e, user * u) { * up the mail command and subjects and stuff... */ - if (mailto && ((ValidateMailRcpts == 0) || safe_p(usernm, mailto)) - /* Why validate the mail recipient name ? All mailers do this anyway... JVD */ - ) { + if (mailto && safe_p(usernm, mailto)) { char **env; char mailcmd[MAX_COMMAND]; char hostname[MAXHOSTNAMELEN]; diff --git a/src/globals.h b/src/globals.h index cdcf578..82e6980 100644 --- a/src/globals.h +++ b/src/globals.h @@ -64,7 +64,6 @@ XTRN int LineNumber; XTRN time_t StartTime; XTRN int NoFork; XTRN int PermitAnyCrontab; -XTRN int ValidateMailRcpts; XTRN char MailCmd[MAX_COMMAND]; XTRN char cron_default_mail_charset[MAX_ENVSTR];