Commit Graph

50 Commits

Author SHA1 Message Date
christos cc31744fc2 I am having the last_word: Print the full hostname. 2015-12-17 22:36:48 +00:00
christos bc0d7f41c8 fix type 2015-11-20 23:43:52 +00:00
joerg 0b40943b07 bail is dead. 2015-01-04 18:45:17 +00:00
christos 2ef06139f8 - Don't allow bypassing file size limits with crontabs from stdin.
- Allow signals while reading the user crontab file; doing "crontab -"
  does not let you abort otherwise, and doing ^Z, kill %1 leaves turds
  in /var/cron/tabs
2014-12-15 16:45:26 +00:00
tron 7edfdcc221 Make crontab(1) work again which got broken by the last commit. 2014-09-07 13:35:27 +00:00
joerg 5f34e14bbb Mark usage and quit as dead. 2014-09-07 13:34:12 +00:00
christos 734041fc2a store lastch to an int so that EOF is handled properly. 2014-09-06 12:18:49 +00:00
christos ae5dea0a14 WARNS=6 2014-09-05 21:32:37 +00:00
christos f8739668ae Rewind the file before we install it so that we can check it.
Before this fix, no checks were made and you could install crap.
XXX: pullup 7
2014-09-05 20:55:11 +00:00
skrll 79e4d54844 PR/48944: cron ignores '?' (question mark) time field
Fix the obvious merge botch.
2014-06-24 09:17:54 +00:00
christos a362d64092 even more detailed logging 2014-06-23 01:00:48 +00:00
dholland b30059e657 Log some actual information on various failures, so you can tell
what happened.
2014-06-21 04:33:53 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
christos af0a310db8 PR/47362: Brian Marcotte: cron is too restrictive on file permissions
Allow file not being writable by owner.
XXX: pullup to 6.
2012-12-24 19:30:46 +00:00
christos 98b021fd71 make the utime and utimes cases work too. 2012-11-03 17:33:01 +00:00
christos 0a00da6dcc use utimensat(2) and correct and centralize file times handling. 2012-11-03 15:39:23 +00:00
abs 86aebb49c7 Switch -current vax back to gcc 4.1 to match netbsd-6 - until someone has
time to look at the gcc 4.5 codegen issues we should at least have a usable
-current for vax.
2012-06-22 20:32:34 +00:00
joerg b757af438b Disable new -Wstring-plus-int warning where needed for now.
Adjust various places that add GCC-only options to check for the active
compiler first.
2012-04-04 10:59:44 +00:00
tron d2071ea334 Fix multiple problems in previous commit:
1.) Correct set-uid check to allow "root" to run "crontab -l" again.
2.) Don't the the last error reported in "errno" in case "crontab" is not
    installed set-uid "root". As no system-call failed "errno" is set
    to zero.
2012-03-04 18:38:31 +00:00
christos 2ed8e2f0f4 PR/46127: Holger Weiss: "crontab <file>" fails for unprivileged users
XXX: Pullup to 6
2012-03-02 19:26:40 +00:00
christos 1a007818e3 simplify the bad extension code, by dsl. 2011-10-14 14:38:20 +00:00
joerg 158f0bd157 Kill redundant () 2011-10-13 16:58:30 +00:00
wiz 6bc209b109 Remove trailing whitespace. 2011-10-12 22:50:31 +00:00
christos 5a7c3e577e renamed len -> i but did not fix it everywhere. 2011-10-12 19:48:24 +00:00
christos 70b3f8cd32 process files in /etc/cron.d/ 2011-10-12 16:39:48 +00:00
christos 6ee25ca9b9 use cleantags, instead of home grown copy. 2011-10-08 19:28:38 +00:00
joerg ba0add90b0 Disable noreturn checks for remaining external code 2011-09-16 16:41:20 +00:00
christos 27ed5dfb1a - exit with ERROR_EXIT consistently
- don't use warnx() for things that set errno
- check result of setlogin()
- don't call setlogin() without calling setsid()
  should fix kernel warnings like:
	cron (pid NNNNN) changing logname from root to USER
	cron (pid MMMMM) changing logname from USER to root
2011-07-17 01:16:46 +00:00
christos bd253b6939 calling setlogin() once is good enough. 2011-07-17 01:14:25 +00:00
tron c4f7aae542 Use setenv(3) instead of putenv(3) because the later doesn't accept
string constants anymore.
2010-10-02 12:22:20 +00:00
christos 6533f925b7 Document the format of the system crontab file, since cron(8) says that we do. 2010-07-15 22:18:20 +00:00
christos 4d77e7cf65 PR/43623: Takahiro Kambe: Allow /etc/crontab processing if it is not writable,
don't insist that it is mode 0600.
2010-07-15 20:04:14 +00:00
christos 7035a6c5ea remove bad cast. 2010-07-15 20:03:28 +00:00
christos dbee6f29d8 PR bin/43591: Jeremy Reed: make sure that the default path is always set. 2010-07-10 21:42:29 +00:00
christos 9d32a81030 rename the allow and deny files to match the documentation. 2010-05-19 12:50:49 +00:00
christos 71a5eeb0d1 - The new cron keeps time internally as localtime. Revert to previous behavior
of keeping UTC, and handle timezones the way we handled them before (CRON_TZ).
  The old behavior can be selected with defining CRON_LOCALTIME.
- Provide functions to pretty-print crontab entries.
2010-05-18 21:49:51 +00:00
christos e8894454ad Forgot to commit this:
Bring back the default to allow any user to install crontabs.
2010-05-18 21:47:43 +00:00
joerg 26593da519 Fix .At argument. 2010-05-13 22:35:57 +00:00
wiz 6f0c1d2e97 Remove trailing whitespace; new sentence, new line; sort sections;
standardize SYNOPSIS; use serial comma.
2010-05-08 11:55:01 +00:00
christos 979605cffd specify bindir 2010-05-07 21:54:07 +00:00
christos b8f08142d6 change to mandoc 2010-05-07 20:43:40 +00:00
christos dcb0cbe948 bump crontab limit to 256K per the old manual page. 2010-05-07 20:43:27 +00:00
christos 6611a4be6f remove the +1 second. Otherwise jobs that are supposed to run at 10:00:00,
run at 10:00:01 which is tolerable because cron has a 1 minute granularity,
but confusing. This restores the old behavior with the new timing logic.
2010-05-07 17:12:00 +00:00
christos c3f423a27c for posterity. 2010-05-06 23:19:56 +00:00
christos 32d0172f96 remember to restore the original timezone. 2010-05-06 22:38:14 +00:00
christos c809afbc3f - change times to time_t
- use the correct time in job_add
- bring back CRON_TZ
2010-05-06 21:50:16 +00:00
christos 1f7f15c404 Add build glue. 2010-05-06 18:58:45 +00:00
christos 032a439890 apply our changes. 2010-05-06 18:53:17 +00:00
christos 0061c6a57d import cron 4.1 2010-05-06 18:50:28 +00:00