Age | Commit message (Collapse) | Author | |
---|---|---|---|
2018-07-13 | Unused variable. | Kenneth R Westerback | |
ok deraadt@ | |||
2018-07-11 | retire the old cron socket path; ok jca millert | Theo de Raadt | |
2018-06-13 | zap a stray ';' and make a comment less ugly | Theo Buehler | |
2018-06-13 | avoid a double flag; | Jason McIntyre | |
2018-06-13 | Add crontab entry option -n for "No mail when run successful" | job | |
OK jmc@ millert@ | |||
2018-02-05 | Pass a FILE * instead of a file descriptor into load_user() and | Todd C. Miller | |
perform the fclose() in process_crontab(). Previously we were closing the crontab fd twice--once in load_user() via fclose() and once in process_crontab(). OK tb@ | |||
2017-10-25 | Open a bunch of fds with O_CLOEXEC | Jeremie Courreges-Anglas | |
Not needed in theory, but could prevent accidental leaks. ok millert@ | |||
2017-10-23 | Close the socket (and dfd) in at(1) child processes | Jeremie Courreges-Anglas | |
Fixes a failure at restart if a child process still has the socket opened. Spotted by millert@, ok friehm@ millert@ | |||
2017-10-23 | Close cron sockets in child processes. | friehm | |
ok jca@ | |||
2017-06-08 | update permissions info to match recent changes | Todd C. Miller | |
2017-06-08 | Add logging for when we find a non-file in the at spool that was | Todd C. Miller | |
a file when we scanned the at spool earlier. | |||
2017-06-07 | In cron(8), require that crontab and at files in the spool be owned | Todd C. Miller | |
by group crontab. The at(1) command now creates files owned by group crontab, the crontab(1) command already does this. Files in the crontab spool with parse errors are now ignored; crontab(1) will not install a crontab file with parse errors. The system crontab file (/etc/crontab) is not affected by this. The required permissions on crontab files have been tightened. Files in the cron spool must be mode 0600 (as created by crontab(1)). The system crontab file may be readable/writable by the owner, readable by group and readable by other. The system crontab must be readable by the owner. | |||
2017-06-07 | When running at jobs, open the at spool and use the directory fd | Todd C. Miller | |
with openat(), fstatat() and unlinkat(). This is similar to how we run cron jobs and eliminates the need for run_job() to find the basename of the at file. OK deraadt@ | |||
2017-06-05 | Set the group on cron's Unix domain socket _before_ making it | Todd C. Miller | |
group-writable, not after. Pointed out by Solar Designer. | |||
2016-10-12 | Document the "-q " prefix accepted in the "command" field. | Ingo Schwarze | |
Original patch from Wouter Clarie <wclarie at gmail com>, tweaked in joint work with jca@, OK millert@, OK jca@ on an earlier version. | |||
2016-08-30 | Fix fd leak on error. OK jsg@ | Todd C. Miller | |
2016-01-11 | When caching the mtime of the spool directory and system crontab files, | Todd C. Miller | |
stash a struct timespec, not just a time_t. Fixes a bug where cron could skip re-reading the spool after two consecutive changes. | |||
2015-11-17 | Check pipe(2) return value; noticed by deraadt@ | Todd C. Miller | |
2015-11-17 | Check for setgid() failure before executing editor and warn if | Todd C. Miller | |
exec of shell + editor fails. | |||
2015-11-15 | Clean up the remaining uses of stderr and perror() and use warn/err | Todd C. Miller | |
and/or syslog depending on whether stderr is hooked up at the time. Also remove closelog() which is not needed since we are headed for exec. OK guenther@ | |||
2015-11-14 | Cleanup from unifdef: set sact.sa_flags to SA_RESTART instead of | Todd C. Miller | |
clearing it and then ORin in SA_RESTART. | |||
2015-11-14 | Remove log_it() and call syslog(3) directly using the same format: | Todd C. Miller | |
"(username) WHAT (details)". Logs due to normal operation (e.g. crontab operations or running commands) are logged at LOG_INFO like before. Actual errors are logged at LOG_ERR, less important things are logged at LOG_WARNING OR LOG_NOTICE. Also ignore SIGHUP now that there is no log file to reopen. | |||
2015-11-12 | new location for cron sockets; ok millert | Jason McIntyre | |
2015-11-12 | Use absolute paths in pathnames.h. There is no longer a need to | Todd C. Miller | |
chdir(2) to the cron dir and cron(8) now changes to / via daemon(3). We no longer try to create/chmod the spool directories as they should be set correctly at install time. The setegid(crontab) has been moved to open_socket() so it is closer to the chmod(2) call that needs it. OK deraadt@ tedu@ | |||
2015-11-12 | Remove SIGNALS section now that the non-syslog code has been removed. | Todd C. Miller | |
2015-11-12 | Move cron socket to /var/run/cron.sock. Client code will try the old | Todd C. Miller | |
location if the new one doesn't exist for now. In order to allow the fchown() to succeed, cron now sets its effective gid to crontab. OK jca@ deraadt@ | |||
2015-11-11 | Use warn/warnx and err/errx. OK jca@ | Todd C. Miller | |
2015-11-11 | Niether cron nor crontab need flock permission. | Todd C. Miller | |
2015-11-11 | Remove obsolete utime() call. It predates the use of a socket to | Todd C. Miller | |
prod cron into checking the spool dir. | |||
2015-11-11 | Fix spool dir mode check to avoid extraneous chmod() calls. | Todd C. Miller | |
2015-11-11 | For "crontab -u user -e" change the euid for the mkstemp() call | Todd C. Miller | |
instead of calling fchown() after the fact. Fixes a pledge() issue. OK semarie@ | |||
2015-11-11 | exit on pledge failure, oops | Theo de Raadt | |
2015-11-09 | Remove unused xpid argument to log_it(). | Todd C. Miller | |
2015-11-09 | Update CRONDIR comment to reality. | Todd C. Miller | |
2015-11-09 | Rename AT_DIR -> AT_SPOOL and SPOOL_DIR -> CRON_SPOOL to improve | Todd C. Miller | |
readability. | |||
2015-11-09 | Use fstatat() when checking the files in the at queue so we | Todd C. Miller | |
don't need to chdir to the queue dir. OK guenther@ | |||
2015-11-09 | queue(3) instead of homegrown queues and lists. This also fixes | Todd C. Miller | |
some potential memory leaks in error paths. OK guenther@ | |||
2015-11-08 | Quiet silly clang analyzer warning in calloc() usage. | Todd C. Miller | |
2015-11-06 | Use __progname instead of the homegrown ProgramName. | Todd C. Miller | |
2015-11-04 | Change cron from including all headers in every file to only including | Todd C. Miller | |
what each .c file needs. I have not removed cron.h since it will be used in a future clean up of the cron's .h files. OK nicm@ | |||
2015-11-04 | Remove unused LogFD variable | Todd C. Miller | |
2015-11-04 | Change some globals from extern to static when they are not used | Todd C. Miller | |
outside their respective .c files. Also remove some unused defines. OK jung@ | |||
2015-11-03 | If pledge(2) fails use perror instead of log_it(RealUser, ...) since | Todd C. Miller | |
RealUser has not been filled in yet. | |||
2015-11-03 | It is only necessary to swap the effective gid when reading a file. | Todd C. Miller | |
Since we got rid of TMPDIR support there's no need to swap gids when creating or unlinking the temporary file. OK deraadt@ | |||
2015-11-03 | Use send(MSG_NOSIGNAL) instead of mucking with the disposition of SIGPIPE | Philip Guenther | |
ok millert@ | |||
2015-11-02 | Use setegid() directly instead of swap_gids() / swap_gids_back(). | Todd C. Miller | |
OK jca@ nicm@ | |||
2015-10-31 | Split client-only (at, crontab) functions out of misc.c and into | Todd C. Miller | |
client.c. Move truly common functions into common.c. This avoids dead code in the at and crontab commands. | |||
2015-10-31 | open_socket() is only used by cron proper so move to cron.c | Todd C. Miller | |
2015-10-31 | swap_gids and swap_gids_back are only used by crontab.c so | Todd C. Miller | |
move them there. | |||
2015-10-29 | Also need exec to run the editor of course. | Todd C. Miller | |