[1/2] log.dat: Fix bug13762 - ssh logins not shown in system logs

Message ID 20240828100446.6617-1-adolf.belka@ipfire.org
State New
Headers
Series [1/2] log.dat: Fix bug13762 - ssh logins not shown in system logs |

Commit Message

Adolf Belka Aug. 28, 2024, 10:04 a.m. UTC
  - With the update of openssh to version 9.8 in CU187 the daemon was changed from sshd to
   sshd-session. Therefore the log.dat no longer finds any info related to the logins.
- This updates the section regex to look for both sshd and sshd-session.
- Tested out on my vm system and confirmed to work.
- This fix will make available all previous log info for sshd-session in the messages log
   as it continued to be stored, just could not be read by the WUI system log.

Fixes: bug13762
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 html/cgi-bin/logs.cgi/log.dat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Bernhard Bitsch Aug. 29, 2024, 9:28 a.m. UTC | #1
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>

Am 28.08.2024 um 12:04 schrieb Adolf Belka:
> - With the update of openssh to version 9.8 in CU187 the daemon was changed from sshd to
>     sshd-session. Therefore the log.dat no longer finds any info related to the logins.
> - This updates the section regex to look for both sshd and sshd-session.
> - Tested out on my vm system and confirmed to work.
> - This fix will make available all previous log info for sshd-session in the messages log
>     as it continued to be stored, just could not be read by the WUI system log.
> 
> Fixes: bug13762
> Tested-by: Adolf Belka <adolf.belka@ipfire.org>
> Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
> ---
>   html/cgi-bin/logs.cgi/log.dat | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat
> index 01c382a0d..41f81e99d 100644
> --- a/html/cgi-bin/logs.cgi/log.dat
> +++ b/html/cgi-bin/logs.cgi/log.dat
> @@ -75,7 +75,7 @@ my %sections = (
>           'samba' => '(nmbd|smbd|winbind)\[\d+\]:',
>           'suricata' => '(suricata: )',
>           'squid' => '(squid\[.*\]: |squid: )',
> -        'ssh' => '(sshd(?:\(.*\))?\[.*\]: )',
> +        'ssh' => '(sshd(?:\(.*\))?\[.*\]: |sshd-session(?:\(.*\))?\[.*\]:)',
>           'unbound' => '(unbound: \[.*?\])(.*:.*$)',
>           'urlfilter bl' => '(installpackage\[urlfilter\]: )',
>           'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:)',
  

Patch

diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat
index 01c382a0d..41f81e99d 100644
--- a/html/cgi-bin/logs.cgi/log.dat
+++ b/html/cgi-bin/logs.cgi/log.dat
@@ -75,7 +75,7 @@  my %sections = (
         'samba' => '(nmbd|smbd|winbind)\[\d+\]:',
         'suricata' => '(suricata: )',
         'squid' => '(squid\[.*\]: |squid: )',
-        'ssh' => '(sshd(?:\(.*\))?\[.*\]: )',
+        'ssh' => '(sshd(?:\(.*\))?\[.*\]: |sshd-session(?:\(.*\))?\[.*\]:)',
         'unbound' => '(unbound: \[.*?\])(.*:.*$)',
         'urlfilter bl' => '(installpackage\[urlfilter\]: )',
         'wireless' => '(hostapd:|kernel: ath.*:|kernel: wifi[0-9]:)',