* 'namelength20' of https://github.com/grooverdan/fail2ban:
  DOC: document rational behind 20 character jail name limit

Conflicts:
	ChangeLog
pull/337/merge
Yaroslav Halchenko 11 years ago
commit 982d5abbef

@ -21,6 +21,10 @@ ver. 0.8.12 (2013/12/XX) - things-can-only-get-better
465. Thanks Stefan. Closes gh-447 465. Thanks Stefan. Closes gh-447
- mysqld-syslog-iptables rule was too long. Part of gh-447. - mysqld-syslog-iptables rule was too long. Part of gh-447.
- Enhancements:
- long names on jails documented based on iptables limit of 30 less
len("fail2ban-").
- New Features: - New Features:
Daniel Black Daniel Black

@ -102,9 +102,11 @@ class Jail:
self.__filter = FilterPyinotify(self) self.__filter = FilterPyinotify(self)
def setName(self, name): def setName(self, name):
# 20 based on iptable chain name limit of 30 less len('fail2ban-')
if len(name) >= 20: if len(name) >= 20:
logSys.warning("Jail name %r might be too long and some commands " logSys.warning("Jail name %r might be too long and some commands"
"might not function correctly. Please shorten" " (e.g. iptables) might not function correctly."
" Please shorten"
% name) % name)
self.__name = name self.__name = name

Loading…
Cancel
Save