fix: syslog, pull out pam program source (#5942)

* Clean up syslog integration

* Fix syslog test

* Fix some more tests I missed earlier
This commit is contained in:
Florian Beer
2017-02-21 15:40:16 +01:00
committed by Tony Murray
parent 29d19c6be7
commit 2f924cb47b
2 changed files with 5 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ function process_syslog($entry, $update)
$matches = array();
// pam_krb5(sshd:auth): authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231
// pam_krb5[sshd:auth]: authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231
if (preg_match('#^(?P<program>([^(:]+\([^)]+\)|[^\[:]+\[[^\]]+\])) ?: ?(?P<msg>.*)$#', $entry['msg'], $matches)) {
if (empty($entry['program']) and preg_match('#^(?P<program>([^(:]+\([^)]+\)|[^\[:]+\[[^\]]+\])) ?: ?(?P<msg>.*)$#', $entry['msg'], $matches)) {
$entry['msg'] = $matches['msg'];
$entry['program'] = $matches['program'];
} // SYSLOG CONNECTION BROKEN; FD='6', SERVER='AF_INET(123.213.132.231:514)', time_reopen='60'