diff --git a/chkcrontab_lib.py b/chkcrontab_lib.py index 12778cdb7f6b8f452034c4648df8a6c77ee38b3b..a50286ab2330f8dd70f11f29f3f88fe7529b1b6f 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 %