diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-03-18 21:23:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-03-18 21:23:05 +0000 |
commit | 5f9f3b875ef7e9a8f6364d08892ddf752d3451b8 (patch) | |
tree | 1c17e4f2e36029df99b52b2d2e3b3cad5bc20411 /usr.sbin | |
parent | 73822b33170c55f3895c839a96f283f51025560e (diff) |
fix parsing of commands after @ keywords and hourly bitmap handling;
sheldonh@uunet.co.za
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/cron/entry.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/usr.sbin/cron/entry.c b/usr.sbin/cron/entry.c index 4b39d2650a6..a4283732f6d 100644 --- a/usr.sbin/cron/entry.c +++ b/usr.sbin/cron/entry.c @@ -16,7 +16,7 @@ */ #if !defined(lint) && !defined(LINT) -static char rcsid[] = "$Id: entry.c,v 1.5 1997/12/22 08:10:43 deraadt Exp $"; +static char rcsid[] = "$Id: entry.c,v 1.6 2000/03/18 21:23:04 deraadt Exp $"; #endif /* vix 26jan87 [RCS'd; rest of log is in RCS file] @@ -150,7 +150,7 @@ load_entry(file, error_func, pw, envp) bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1)); } else if (!strcmp("hourly", cmd)) { bit_set(e->minute, 0); - bit_set(e->hour, (LAST_HOUR-FIRST_HOUR+1)); + bit_nset(e->hour, 0, (LAST_HOUR-FIRST_HOUR+1)); bit_nset(e->dom, 0, (LAST_DOM-FIRST_DOM+1)); bit_nset(e->month, 0, (LAST_MONTH-FIRST_MONTH+1)); bit_nset(e->dow, 0, (LAST_DOW-FIRST_DOW+1)); @@ -159,6 +159,14 @@ load_entry(file, error_func, pw, envp) ecode = e_timespec; goto eof; } + /* Advance past whitespace between shortcut and + * username/command. + */ + Skip_Blanks(ch, file); + if (ch == EOF) { + ecode = e_cmd; + goto eof; + } } else { Debug(DPARS, ("load_entry()...about to parse numerics\n")) |