diff --git a/chkcrontab_lib.py b/chkcrontab_lib.py index c1c1004ab8ce41de95bd8e7b49e971eae0a0f4ae..61db9d90a5d449b3f02ad41f52a3c91b51b27178 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 a37832db0b11b25aa00b914f7f3ca5cb74020f97..877497287b9fa3959637034fe3fd5c12f721dba8 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 %