mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
ntp+cmdmon: log allow/deny commands
Log added NTP and command access restrictions, using INFO severity if from a chronyc command, DEBUG otherwise (i.e. from the config).
This commit is contained in:
@@ -2856,6 +2856,10 @@ NCR_AddAccessRestriction(IPAddr *ip_addr, int subnet_bits, int allow, int all)
|
||||
if (status != ADF_SUCCESS)
|
||||
return 0;
|
||||
|
||||
LOG(LOG_GetContextSeverity(LOGC_Command), "%s%s %s access from %s",
|
||||
allow ? "Allowed" : "Denied", all ? " all" : "", "NTP",
|
||||
UTI_IPSubnetToString(ip_addr, subnet_bits));
|
||||
|
||||
/* Keep server sockets open only when an address allowed */
|
||||
if (allow) {
|
||||
NTP_Remote_Address remote_addr;
|
||||
|
||||
Reference in New Issue
Block a user