summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Quiet silly clang analyzer warning in calloc() usage.millert2015-11-081-2/+2
|
* Use __progname instead of the homegrown ProgramName.millert2015-11-065-47/+35
|
* Change cron from including all headers in every file to only includingmillert2015-11-0417-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 variablemillert2015-11-041-6/+1
|
* Change some globals from extern to static when they are not usedmillert2015-11-046-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, ...) sincemillert2015-11-031-3/+3
| | | | RealUser has not been filled in yet.
* It is only necessary to swap the effective gid when reading a file.millert2015-11-031-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 SIGPIPEguenther2015-11-031-4/+2
| | | | ok millert@
* Use setegid() directly instead of swap_gids() / swap_gids_back().millert2015-11-021-33/+25
| | | | OK jca@ nicm@
* Split client-only (at, crontab) functions out of misc.c and intomillert2015-10-314-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.cmillert2015-10-313-60/+60
|
* swap_gids and swap_gids_back are only used by crontab.c somillert2015-10-313-16/+15
| | | | move them there.
* Also need exec to run the editor of course.millert2015-10-291-2/+2
|
* crontab needs "proc" for fork(2)millert2015-10-291-2/+2
|
* Use stravis(3) instead of a homegrown vis-like function.millert2015-10-293-61/+9
| | | | OK nicm@
* remove unused variablesmillert2015-10-292-4/+3
|
* Convert env_get() into env_find() similar to __findenv() in libc.millert2015-10-293-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.millert2015-10-291-12/+2
| | | | Remove unneeded limits.h include.
* pledgederaadt2015-10-282-2/+12
| | | | ok millert
* Remove TMPDIR support, it is not really useful in crontab.millert2015-10-262-18/+6
| | | | OK deraadt@
* Use SOCK_NONBLOCK and SOCK_CLOEXEC instead of fcntl() calls.millert2015-10-262-19/+6
| | | | OK guenther@
* Remove some useless defines and the set_cron_uid() function.millert2015-10-266-29/+14
| | | | OK jung@
* Remove PIDDIR and PIDFILE missed in previous commit.millert2015-10-251-12/+1
|
* Remove cron.pid support. We still want to avoid multiple cronsmillert2015-10-254-128/+18
| | | | | running so verify that if the cron socket exists nothing is listening on it. OK tedu@
* remove some more ifdef mazinesstedu2015-10-235-71/+5
|
* clear out some more legacy code and whatnottedu2015-10-0612-201/+12
|
* remove stale comment. there is no need to avoid side effects from a "list"tedu2015-10-041-4/+2
| | | | command, because this is not the ftp daemon
* There is no need to keep a global array of sysconf(_SC_OPEN_MAX) elementstedu2015-10-034-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 zhuktedu2015-10-035-86/+5
|
* Use ppoll(2) instead of poll(2). This has two benefits. Firstly,millert2015-08-253-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()deraadt2015-02-092-5/+5
| | | | ok florian
* correct copyright, upon approval from paul vixie via todd miller. thederaadt2015-02-0913-65/+13
| | | | head copyright assertion was seperated from the remaining ones.
* braces to open a function go on their own line like god intendedtedu2015-01-2310-67/+124
|
* delete some code that doesn't (and shouldn't) run. ok deraadt millerttedu2015-01-231-5/+1
|
* Remove now-unused DebugFlags.millert2015-01-231-3/+1
|
* Remove the OK and ERR macros. They obfuscate the code and don'ttedu2015-01-239-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 cleanuptedu2015-01-232-6/+4
|
* remove debug code.tedu2015-01-2314-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 millerttedu2015-01-226-18/+18
|
* If UID_MAX is not defined, this should fail to compile.deraadt2015-01-191-8/+1
| | | | ok guenther
* Use reallocarray() instead of calloc() when making a copy of themillert2015-01-141-3/+3
| | | | environment. We already explicitly NULL terminate the array.
* Replace MAXHOSTNAMELEN with HOST_NAME_MAX+1 and MAXNAMLEN with NAME_MAXmillert2015-01-145-13/+9
| | | | and use limits.h instead of sys/param.h.
* Use HAVE_FOO for BSD-specific features instead of relying on themillert2015-01-146-16/+23
| | | | BSD macro from sys/param.h.
* Use standard types for wait, readdir, signals and pids.millert2015-01-148-27/+22
|
* Remove compatibility defines for ancient systems. We assume amillert2015-01-143-79/+4
| | | | reasonable level of POSIX compliance.
* Prefer setvbuf() to setlinebuf() for portability; ok deraadt@millert2014-11-262-9/+5
|
* use poll() instead of the select malloc/free dance which was used toderaadt2014-10-292-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)guenther2014-10-261-6/+9
| | | | | | instead of calling fcntl(F_SETFD) later. ok otto@ millert@
* use reallocarray() instead of realloc() to handle potential integer overflow; ok dougderaadt2014-10-081-3/+2
|
* Delete secret or secret-derived data with explicit_bzero.doug2014-08-251-2/+2
| | | | | concept ok deraadt@ diff looks ok tedu@