DOC: document rational behind 20 character jail name limit

This commit is contained in:
Daniel Black 2013-11-28 23:18:34 +11:00
parent f80fa7d7a0
commit 99838440c8
2 changed files with 6 additions and 2 deletions

View file

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