Fix counting samba computers auth tries

This commit is contained in:
Daniel Berteaud 2022-03-26 18:30:16 +01:00
parent 7cfbd64eb4
commit 5acc49a55c
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ if (defined $ou){
my $subject;
if ($type eq 'Authentication'){
# Accounts ending with $ are for computers
$subject = (($event->{$type}->{mappedAccount} || $event->{$type}->{clientAccount} || '')=~ m/\$$/) ? 'computers' : 'users';
$subject = (($event->{$type}->{mappedAccount} || $event->{$type}->{clientAccount} || '')=~ m/\$(\@.+)?$/) ? 'computers' : 'users';
if ($event->{Authentication}->{status} eq 'NT_STATUS_OK'){
$json->{activity}->{authentications}->{$subject}->{success}++;
} else {