diff options
Diffstat (limited to 'usr.sbin/cron/atrun.c')
-rw-r--r-- | usr.sbin/cron/atrun.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/cron/atrun.c b/usr.sbin/cron/atrun.c index d1414d42592..4f230c30b19 100644 --- a/usr.sbin/cron/atrun.c +++ b/usr.sbin/cron/atrun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atrun.c,v 1.44 2017/06/07 17:59:36 millert Exp $ */ +/* $OpenBSD: atrun.c,v 1.45 2017/06/07 23:36:43 millert Exp $ */ /* * Copyright (c) 2002-2003 Todd C. Miller <Todd.Miller@courtesan.com> @@ -317,6 +317,11 @@ run_job(const atjob *job, int dfd, const char *atfile) atfile); _exit(EXIT_FAILURE); } + if (sb.st_gid != cron_gid) { + syslog(LOG_WARNING, "(%s) WRONG FILE GROUP (%s)", pw->pw_name, + atfile); + _exit(EXIT_FAILURE); + } if (sb.st_nlink > 1) { syslog(LOG_WARNING, "(%s) BAD LINK COUNT (%s)", pw->pw_name, atfile); |