mirror of https://github.com/fail2ban/fail2ban
Merge branch '0.10' into 0.11
commit
4942578de0
|
@ -673,10 +673,10 @@ class LogFileMonitor(LogCaptureTestCase):
|
||||||
failure_was_logged = self._is_logged('Unable to open %s' % self.name)
|
failure_was_logged = self._is_logged('Unable to open %s' % self.name)
|
||||||
# verify that we cannot access the file. Checking by name of user is not
|
# verify that we cannot access the file. Checking by name of user is not
|
||||||
# sufficient since could be a fakeroot or some other super-user
|
# sufficient since could be a fakeroot or some other super-user
|
||||||
|
is_root = True
|
||||||
try:
|
try:
|
||||||
with open(self.name) as f:
|
with open(self.name) as f: # pragma: no cover - normally no root
|
||||||
f.read()
|
f.read()
|
||||||
is_root = True
|
|
||||||
except IOError:
|
except IOError:
|
||||||
is_root = False
|
is_root = False
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ if not CONFIG_DIR:
|
||||||
# Use heuristic to figure out where configuration files are
|
# Use heuristic to figure out where configuration files are
|
||||||
if os.path.exists(os.path.join('config','fail2ban.conf')):
|
if os.path.exists(os.path.join('config','fail2ban.conf')):
|
||||||
CONFIG_DIR = 'config'
|
CONFIG_DIR = 'config'
|
||||||
else:
|
else: # pragma: no cover - normally unreachable
|
||||||
CONFIG_DIR = '/etc/fail2ban'
|
CONFIG_DIR = '/etc/fail2ban'
|
||||||
|
|
||||||
# Indicates that we've stock config:
|
# Indicates that we've stock config:
|
||||||
|
|
Loading…
Reference in New Issue