diff options
| author | 1999-08-28 20:13:13 +0000 | |
|---|---|---|
| committer | 1999-08-28 20:13:13 +0000 | |
| commit | 8eda01eceaa0467d558146c68b4ca163c4e90612 (patch) | |
| tree | 651c346eedfe2a43ad0d9ecd53e6144bf1337e64 /usr.sbin/cron/do_command.c | |
| parent | Fix potential buf oflow in log routines. Adapted from am-utils patch. (diff) | |
| download | wireguard-openbsd-8eda01eceaa0467d558146c68b4ca163c4e90612.tar.xz wireguard-openbsd-8eda01eceaa0467d558146c68b4ca163c4e90612.zip | |
Run sendmail as the user corresponding to the crontab entry.
This keeps a user from abusing sendmail via the MAILTO var.
Had to drop -or0s from MAILARGS since that causes sendmail
to drop its privs (contrary to the sendmail docs).
Diffstat (limited to 'usr.sbin/cron/do_command.c')
| -rw-r--r-- | usr.sbin/cron/do_command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/cron/do_command.c b/usr.sbin/cron/do_command.c index 70fb119b53b..f9b84bd0d59 100644 --- a/usr.sbin/cron/do_command.c +++ b/usr.sbin/cron/do_command.c @@ -16,7 +16,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$Id: do_command.c,v 1.5 1998/05/08 20:17:18 deraadt Exp $"; +static char rcsid[] = "$Id: do_command.c,v 1.6 1999/08/28 20:13:13 millert Exp $"; #endif @@ -387,7 +387,7 @@ child_process(e, u) (void) gethostname(hostname, MAXHOSTNAMELEN); (void) snprintf(mailcmd, sizeof(mailcmd), MAILARGS, MAILCMD); - if (!(mail = cron_popen(mailcmd, "w"))) { + if (!(mail = cron_popen(mailcmd, "w", e))) { perror(MAILCMD); (void) _exit(ERROR_EXIT); } |
