mirror of https://github.com/fail2ban/fail2ban
BF: pyinotify - use bitwise op on masks and do not try tracking newly created directories
parent
b8a861d012
commit
6b2e76ba7f
|
@ -65,7 +65,11 @@ class FilterPyinotify(FileFilter):
|
||||||
|
|
||||||
def callback(self, event):
|
def callback(self, event):
|
||||||
path = event.pathname
|
path = event.pathname
|
||||||
if event.mask == pyinotify.IN_CREATE:
|
if event.mask & pyinotify.IN_CREATE:
|
||||||
|
# skip directories altogether
|
||||||
|
if event.mask & pyinotify.IN_ISDIR:
|
||||||
|
logSys.debug("Ignoring creation of directory %s" % path)
|
||||||
|
return
|
||||||
# check if that is a file we care about
|
# check if that is a file we care about
|
||||||
if not path in self.__watches:
|
if not path in self.__watches:
|
||||||
logSys.debug("Ignoring creation of %s we do not monitor" % path)
|
logSys.debug("Ignoring creation of %s we do not monitor" % path)
|
||||||
|
|
Loading…
Reference in New Issue