Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Quiet silly clang analyzer warning in calloc() usage. | 2015-11-08 | 1 | -2/+2 | ||
| | ||||||
* | Use __progname instead of the homegrown ProgramName. | 2015-11-06 | 5 | -47/+35 | ||
| | ||||||
* | Change cron from including all headers in every file to only including | 2015-11-04 | 17 | -89/+251 | ||
| | | | | | 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@ | |||||
* | Remove unused LogFD variable | 2015-11-04 | 1 | -6/+1 | ||
| | ||||||
* | Change some globals from extern to static when they are not used | 2015-11-04 | 6 | -93/+38 | ||
| | | | | | outside their respective .c files. Also remove some unused defines. OK jung@ | |||||
* | If pledge(2) fails use perror instead of log_it(RealUser, ...) since | 2015-11-03 | 1 | -3/+3 | ||
| | | | | RealUser has not been filled in yet. | |||||
* | It is only necessary to swap the effective gid when reading a file. | 2015-11-03 | 1 | -33/+1 | ||
| | | | | | Since we got rid of TMPDIR support there's no need to swap gids when creating or unlinking the temporary file. OK deraadt@ | |||||
* | Use send(MSG_NOSIGNAL) instead of mucking with the disposition of SIGPIPE | 2015-11-03 | 1 | -4/+2 | ||
| | | | | ok millert@ | |||||
* | Use setegid() directly instead of swap_gids() / swap_gids_back(). | 2015-11-02 | 1 | -33/+25 | ||
| | | | | OK jca@ nicm@ | |||||
* | Split client-only (at, crontab) functions out of misc.c and into | 2015-10-31 | 4 | -177/+222 | ||
| | | | | | client.c. Move truly common functions into common.c. This avoids dead code in the at and crontab commands. | |||||
* | open_socket() is only used by cron proper so move to cron.c | 2015-10-31 | 3 | -60/+60 | ||
| | ||||||
* | swap_gids and swap_gids_back are only used by crontab.c so | 2015-10-31 | 3 | -16/+15 | ||
| | | | | move them there. | |||||
* | Also need exec to run the editor of course. | 2015-10-29 | 1 | -2/+2 | ||
| | ||||||
* | crontab needs "proc" for fork(2) | 2015-10-29 | 1 | -2/+2 | ||
| | ||||||
* | Use stravis(3) instead of a homegrown vis-like function. | 2015-10-29 | 3 | -61/+9 | ||
| | | | | OK nicm@ | |||||
* | remove unused variables | 2015-10-29 | 2 | -4/+3 | ||
| | ||||||
* | Convert env_get() into env_find() similar to __findenv() in libc. | 2015-10-29 | 3 | -67/+51 | ||
| | | | | | Use env_find() in both env_get() and env_set() to find a var in envp. Remove now-unused strcmp_until() function. | |||||
* | Remove useless FACILITY define and use LOG_CRON directly. | 2015-10-29 | 1 | -12/+2 | ||
| | | | | Remove unneeded limits.h include. | |||||
* | pledge | 2015-10-28 | 2 | -2/+12 | ||
| | | | | ok millert | |||||
* | Remove TMPDIR support, it is not really useful in crontab. | 2015-10-26 | 2 | -18/+6 | ||
| | | | | OK deraadt@ | |||||
* | Use SOCK_NONBLOCK and SOCK_CLOEXEC instead of fcntl() calls. | 2015-10-26 | 2 | -19/+6 | ||
| | | | | OK guenther@ | |||||
* | Remove some useless defines and the set_cron_uid() function. | 2015-10-26 | 6 | -29/+14 | ||
| | | | | OK jung@ | |||||
* | Remove PIDDIR and PIDFILE missed in previous commit. | 2015-10-25 | 1 | -12/+1 | ||
| | ||||||
* | Remove cron.pid support. We still want to avoid multiple crons | 2015-10-25 | 4 | -128/+18 | ||
| | | | | | running so verify that if the cron socket exists nothing is listening on it. OK tedu@ | |||||
* | remove some more ifdef maziness | 2015-10-23 | 5 | -71/+5 | ||
| | ||||||
* | clear out some more legacy code and whatnot | 2015-10-06 | 12 | -201/+12 | ||
| | ||||||
* | remove stale comment. there is no need to avoid side effects from a "list" | 2015-10-04 | 1 | -4/+2 | ||
| | | | | command, because this is not the ftp daemon | |||||
* | There is no need to keep a global array of sysconf(_SC_OPEN_MAX) elements | 2015-10-03 | 4 | -34/+20 | ||
| | | | | | | just to keep track of a single pid. Return it to the caller and make it their problem. ok deraadt millert | |||||
* | unifdef some features we will always have. ok benno zhuk | 2015-10-03 | 5 | -86/+5 | ||
| | ||||||
* | Use ppoll(2) instead of poll(2). This has two benefits. Firstly, | 2015-08-25 | 3 | -32/+34 | ||
| | | | | | | | we can use struct timespec throughout and avoid any conversion issues which might cause jobs to fire prematurely. Secondly, it eliminates a race condition that could delay us taking action on SIGCHLD and SIGHUP. OK deraadt@ okan@ ratchov@ | |||||
* | clean up flags++ instances around getopt() | 2015-02-09 | 2 | -5/+5 | ||
| | | | | ok florian | |||||
* | correct copyright, upon approval from paul vixie via todd miller. the | 2015-02-09 | 13 | -65/+13 | ||
| | | | | head copyright assertion was seperated from the remaining ones. | |||||
* | braces to open a function go on their own line like god intended | 2015-01-23 | 10 | -67/+124 | ||
| | ||||||
* | delete some code that doesn't (and shouldn't) run. ok deraadt millert | 2015-01-23 | 1 | -5/+1 | ||
| | ||||||
* | Remove now-unused DebugFlags. | 2015-01-23 | 1 | -3/+1 | ||
| | ||||||
* | Remove the OK and ERR macros. They obfuscate the code and don't | 2015-01-23 | 9 | -61/+52 | ||
| | | | | | | | | | help legibility. (unix system calls use 0 for ok, but hundreds of other projects use 1 to indicate success.) Despite the name, many system calls (e.g., open) also return not OK values for success. It also cleans up some weird code like int crontab_fd = OK - 1; This diff is mechanical in nature. Later I will fix the bugs it reveals. ok deraadt | |||||
* | minor debug removal cleanup | 2015-01-23 | 2 | -6/+4 | ||
| | ||||||
* | remove debug code. | 2015-01-23 | 14 | -368/+23 | ||
| | | | | | | | | | | I think the level of debug code in cron is excessive for a program that has reached feature complete. If cron needs to provide more information to the user about its operational status, I think syslog would be more appropriate. (The debug flags also disable forking into the background, so they aren't even that useful for debugging a live system.) ok deraadt millert | |||||
* | delete useless casts. ok deraadt guenther millert | 2015-01-22 | 6 | -18/+18 | ||
| | ||||||
* | If UID_MAX is not defined, this should fail to compile. | 2015-01-19 | 1 | -8/+1 | ||
| | | | | ok guenther | |||||
* | Use reallocarray() instead of calloc() when making a copy of the | 2015-01-14 | 1 | -3/+3 | ||
| | | | | environment. We already explicitly NULL terminate the array. | |||||
* | Replace MAXHOSTNAMELEN with HOST_NAME_MAX+1 and MAXNAMLEN with NAME_MAX | 2015-01-14 | 5 | -13/+9 | ||
| | | | | and use limits.h instead of sys/param.h. | |||||
* | Use HAVE_FOO for BSD-specific features instead of relying on the | 2015-01-14 | 6 | -16/+23 | ||
| | | | | BSD macro from sys/param.h. | |||||
* | Use standard types for wait, readdir, signals and pids. | 2015-01-14 | 8 | -27/+22 | ||
| | ||||||
* | Remove compatibility defines for ancient systems. We assume a | 2015-01-14 | 3 | -79/+4 | ||
| | | | | reasonable level of POSIX compliance. | |||||
* | Prefer setvbuf() to setlinebuf() for portability; ok deraadt@ | 2014-11-26 | 2 | -9/+5 | ||
| | ||||||
* | use poll() instead of the select malloc/free dance which was used to | 2014-10-29 | 2 | -10/+8 | ||
| | | | | | | | | | | | avoid fd_set overflows. Back when I was young, I fixed these throughout the tree, and the world continued on ignoring the issue... The malloc/free dance was used because poll() was not very portable yet. Now poll() is commonplace, and we should use this safer API. ok guenther millert | |||||
* | Use socket(SOCK_CLOEXEC), open(O_CLOEXEC), and fcntl(F_DUPFD_CLOEXEC) | 2014-10-26 | 1 | -6/+9 | ||
| | | | | | | instead of calling fcntl(F_SETFD) later. ok otto@ millert@ | |||||
* | use reallocarray() instead of realloc() to handle potential integer overflow; ok doug | 2014-10-08 | 1 | -3/+2 | ||
| | ||||||
* | Delete secret or secret-derived data with explicit_bzero. | 2014-08-25 | 1 | -2/+2 | ||
| | | | | | concept ok deraadt@ diff looks ok tedu@ |