Skip to content

Commit

Permalink
Print message that we received SIGHUP into pihole-FTL.log when this h…
Browse files Browse the repository at this point in the history
…appens

Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Mar 18, 2019
1 parent 526ec7e commit f7af506
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 12 additions & 12 deletions capabilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bool check_capabilities()

if(config.debug & DEBUG_CAPS)
{
logg("*********************************************************************");
logg("*********************************************************");
for(unsigned int i = 0u; i < numCaps; i++)
{
unsigned int capid = capabilityIntegers[i];
Expand All @@ -62,38 +62,38 @@ bool check_capabilities()
if(!cap_valid(capid))
break;

logg("DEBUG: Capability %-24s (%02u) = %s%s%s",
logg("* DEBUG: Capability %-24s (%02u) = %s%s%s *",
capabilityNames[capid], capid,
((data->permitted & (1 << capid)) ? "P":"-"),
((data->inheritable & (1 << capid)) ? "I":"-"),
((data->effective & (1 << capid)) ? "E":"-"));
}
logg("*********************************************************************");
logg("*********************************************************");
}

bool capabilities_okay = true;
if (!(data->permitted & (1 << CAP_NET_ADMIN)))
{
// Needed for ARP-injection (used when we're the DHCP server)
logg("*********************************************************************");
logg("WARNING: Required linux capability CAP_NET_ADMIN not available");
logg("*********************************************************************");
logg("*************************************************************************");
logg("* WARNING: Required Linux capability CAP_NET_ADMIN not available *");
logg("*************************************************************************");
capabilities_okay = false;
}
if (!(data->permitted & (1 << CAP_NET_RAW)))
{
// Needed for raw socket access (necessary for ICMP)
logg("*********************************************************************");
logg("WARNING: Required linux capability CAP_NET_RAW not available");
logg("*********************************************************************");
logg("*************************************************************************");
logg("* WARNING: Required Linux capability CAP_NET_RAW not available *");
logg("*************************************************************************");
capabilities_okay = false;
}
if (!(data->permitted & (1 << CAP_NET_BIND_SERVICE)))
{
// Necessary for dynamic port binding
logg("*********************************************************************");
logg("WARNING: Required linux capability CAP_NET_BIND_SERVICE not available");
logg("*********************************************************************");
logg("*************************************************************************");
logg("* WARNING: Required Linux capability CAP_NET_BIND_SERVICE not available *");
logg("*************************************************************************");
capabilities_okay = false;
}

Expand Down
2 changes: 2 additions & 0 deletions dnsmasq_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ void FTL_dnsmasq_reload(void)
// *before* clearing the cache and rereading the lists
// This is the only hook that is not skipped in PRIVACY_NOSTATS mode

logg("Received SIGHUP, reloading cache");

// Called when dnsmasq re-reads its config and hosts files
// Reset number of blocked domains
counters->gravity = 0;
Expand Down

0 comments on commit f7af506

Please sign in to comment.