fixbot/logwatch/filters.py
changeset 66 eb0545ec03e7
parent 57 31e7421e98af
equal deleted inserted replaced
65:1de3c0ca2baf 66:eb0545ec03e7
   176     format  = "SSH login for %(username)s@%(hostname)s from %(ip)s:%(port)s",
   176     format  = "SSH login for %(username)s@%(hostname)s from %(ip)s:%(port)s",
   177 )
   177 )
   178 
   178 
   179 # drops all output from cron
   179 # drops all output from cron
   180 # XXX: what about the same from su?
   180 # XXX: what about the same from su?
   181 cron_killer = SyslogFilter('all',
   181 cron_killer = SyslogFilter('cron',
   182     program = "cron",
   182     program = "cron",
   183     drop    = True,
   183     drop    = True,
   184 )
   184 )
   185 
   185 
   186 # drops `su nobody` output (from cron)
   186 # drops `su nobody` output (from cron)
   187 su_nobody_killer = SyslogFilter('all',
   187 su_nobody_killer = SyslogFilter('su-nobody',
   188     program     = "su",
   188     program     = "su",
   189     pattern     = r"^(Successful su for nobody by root|\+ \?\?\? root:nobody)$",
   189     pattern     = r"^(Successful su for nobody by root|\+ \?\?\? root:nobody)$",
   190     re_flags    = re.IGNORECASE,
   190     re_flags    = re.IGNORECASE,
   191     drop        = True
   191     drop        = True
   192 )
   192 )