summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2006-09-26 18:06:09 +0000
committerbrian <brian@FreeBSD.org>2006-09-26 18:06:09 +0000
commit5a857cb91fd168ff717dc8c442ff016ca7b01b10 (patch)
tree0310af296938617f13a30427308272be67a80a51 /usr.sbin/cron
parenteaa8ea504689ef490cab68c6fd6fec925a09a5fd (diff)
downloadFreeBSD-src-5a857cb91fd168ff717dc8c442ff016ca7b01b10.zip
FreeBSD-src-5a857cb91fd168ff717dc8c442ff016ca7b01b10.tar.gz
Behave as documented when reading fields saying "X/Y" where X != *
rather than mis-parsing them as "X". MFC after: 1 day
Diffstat (limited to 'usr.sbin/cron')
-rw-r--r--usr.sbin/cron/lib/entry.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/cron/lib/entry.c b/usr.sbin/cron/lib/entry.c
index 216e837..d24aadb 100644
--- a/usr.sbin/cron/lib/entry.c
+++ b/usr.sbin/cron/lib/entry.c
@@ -507,7 +507,9 @@ get_range(bits, low, high, names, ch, file)
if (EOF == (ch = get_number(&num1, low, names, ch, file)))
return EOF;
- if (ch != '-') {
+ if (ch == '/')
+ num2 = high;
+ else if (ch != '-') {
/* not a range, it's a single number.
*/
if (EOF == set_element(bits, low, high, num1))
OpenPOWER on IntegriCloud