From 2997a3f9949844acba6977e44e3f3f8aaacf003a Mon Sep 17 00:00:00 2001 From: Ryo Miyake <ryo.studiom@gmail.com> Date: Mon, 5 Jan 2015 15:41:18 +0900 Subject: [PATCH] Check command regardless of the USER_WHITELIST --- chkcrontab_lib.py | 2 +- tests/test_crontab.whitelist | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/chkcrontab_lib.py b/chkcrontab_lib.py index c1c1004..61db9d9 100755 --- a/chkcrontab_lib.py +++ b/chkcrontab_lib.py @@ -707,7 +707,7 @@ class CronLineTimeAction(object): # User checks. if self.user in USER_WHITELIST: - return + pass elif len(self.user) > 31: log.LineError(log.MSG_INVALID_USER, 'Username too long "%s"' % self.user) diff --git a/tests/test_crontab.whitelist b/tests/test_crontab.whitelist index a37832d..8774972 100644 --- a/tests/test_crontab.whitelist +++ b/tests/test_crontab.whitelist @@ -1,3 +1,5 @@ # WARN 1 for questionable file name. # WARN 0 for missing user 1 * * * * not_a_user Command +# WARN 1 for missing user and questionable bare % +1 * * * * not_a_user Command with % -- GitLab