From 3e74102b129284ce535147d6deb513ef73383cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 16 Feb 2016 12:30:18 +0100 Subject: [PATCH] Log authentication attempts to syslog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #6146 Signed-off-by: Michal Čihař --- ChangeLog | 2 +- libraries/logging.lib.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cdb229bc8b..80c2ed94ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog 4.7.0.0 (not yet released) - issue #11924 Remove caching of server information +- issue #6146 Log authentication attempts to syslog 4.6.0.0 (not yet released) + issue #11456 Disabled storage engines @@ -127,7 +128,6 @@ phpMyAdmin - ChangeLog 4.3.14.0 (not yet released) - --- Older ChangeLogs can be found on our project website --- http://www.phpmyadmin.net/old-stuff/ChangeLogs/ diff --git a/libraries/logging.lib.php b/libraries/logging.lib.php index 540ff5a4a5..105a9ead7d 100644 --- a/libraries/logging.lib.php +++ b/libraries/logging.lib.php @@ -22,5 +22,11 @@ function PMA_logUser($user, $status = 'ok') apache_note('userID', $user); apache_note('userStatus', $status); } + if (function_exists('syslog')) { + @syslog( + LOG_AUTHPRIV, + 'phpMyAdmin: ' . $user . ' (' . $status . ') from ' . $_SERVER['REMOTE_ADDR'] + ); + } }