Fix geo-data to log remote_location data when auth is successful.

This commit is contained in:
Michael Dopheide 2019-03-13 14:14:38 -05:00
parent 56da70c148
commit 0f6f6cdb29

View file

@ -35,9 +35,6 @@ event ssh_auth_successful(c: connection, auth_method_none: bool) &priority=3
if ( ! c$ssh?$direction ) if ( ! c$ssh?$direction )
return; return;
# Add the location data to the SSH record.
c$ssh$remote_location = get_location(c);
if ( c$ssh$remote_location?$country_code && c$ssh$remote_location$country_code in watched_countries ) if ( c$ssh$remote_location?$country_code && c$ssh$remote_location$country_code in watched_countries )
{ {
NOTICE([$note=Watched_Country_Login, NOTICE([$note=Watched_Country_Login,
@ -48,7 +45,7 @@ event ssh_auth_successful(c: connection, auth_method_none: bool) &priority=3
} }
} }
event ssh_auth_failed(c: connection) &priority=3 event ssh_auth_attempted(c: connection, authenticated: bool) &priority=3
{ {
if ( ! c$ssh?$direction ) if ( ! c$ssh?$direction )
return; return;