summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaroslav Halchenko <debian@onerussian.com>2012-11-09 10:11:37 -0500
committerYaroslav Halchenko <debian@onerussian.com>2012-11-09 10:11:37 -0500
commitc5237d63755450c1b90e8ad28099bbdd6176511f (patch)
treedbed9c2dc499fdba58589be1d7508d1ea74bba98
parent61097d17bba3500b1155dd8047b7a9646aa52a2d (diff)
parent03b31398aac4ff4edab992b5c3969712bb35858b (diff)
downloadfail2ban-_tent/ipv6_adapter_cmd.tar.gz
Merge branch 'master' into _tent/ipv6_adapter_cmd_tent/ipv6_adapter_cmd
* master: ENH: BF (forgotten import) for prev commit + removed duplicate Author, adjusted __ fields for that in fail2ban-* scripts ENH: until we make it proper module -- adjust sys.path only if system-wide run
-rwxr-xr-xfail2ban-client12
-rwxr-xr-xfail2ban-regex14
-rwxr-xr-xfail2ban-server14
-rwxr-xr-xfail2ban-testcases6
-rwxr-xr-xsetup.py6
5 files changed, 15 insertions, 37 deletions
diff --git a/fail2ban-client b/fail2ban-client
index 66b90333..1d8eb15e 100755
--- a/fail2ban-client
+++ b/fail2ban-client
@@ -18,13 +18,7 @@
# along with Fail2Ban; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# Author: Cyril Jaquier
-#
-# $Revision$
-
__author__ = "Cyril Jaquier"
-__version__ = "$Revision$"
-__date__ = "$Date$"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
@@ -33,7 +27,9 @@ import getopt, time, shlex, socket
# Inserts our own modules path first in the list
# fix for bug #343821
-sys.path.insert(1, "/usr/share/fail2ban")
+if os.path.abspath(__file__).startswith('/usr/'):
+ # makes sense to use system-wide library iff -client is also under /usr/
+ sys.path.insert(1, "/usr/share/fail2ban")
# Now we can import our modules
from common.version import version
@@ -69,7 +65,7 @@ class Fail2banClient:
def dispVersion(self):
print "Fail2Ban v" + version
print
- print "Copyright (c) 2004-2008 Cyril Jaquier"
+ print "Copyright (c) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors"
print "Copyright of modifications held by their respective authors."
print "Licensed under the GNU General Public License v2 (GPL)."
print
diff --git a/fail2ban-regex b/fail2ban-regex
index 0d634b70..3900c909 100755
--- a/fail2ban-regex
+++ b/fail2ban-regex
@@ -15,21 +15,17 @@
# along with Fail2Ban; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# Author: Cyril Jaquier
-#
-# $Revision$
-
-__author__ = "Cyril Jaquier"
-__version__ = "$Revision$"
-__date__ = "$Date$"
-__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
+__author__ = "Cyril Jaquier, Yaroslav Halchenko"
+__copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2012 Yaroslav Halchenko"
__license__ = "GPL"
import getopt, sys, time, logging, os
# Inserts our own modules path first in the list
# fix for bug #343821
-sys.path.insert(1, "/usr/share/fail2ban")
+if os.path.abspath(__file__).startswith('/usr/'):
+ # makes sense to use system-wide library iff -regex is also under /usr/
+ sys.path.insert(1, "/usr/share/fail2ban")
from client.configparserinc import SafeConfigParserWithIncludes
from ConfigParser import NoOptionError, NoSectionError, MissingSectionHeaderError
diff --git a/fail2ban-server b/fail2ban-server
index f6f1dac4..bd86e6cd 100755
--- a/fail2ban-server
+++ b/fail2ban-server
@@ -18,21 +18,17 @@
# along with Fail2Ban; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# Author: Cyril Jaquier
-#
-# $Revision$
-
__author__ = "Cyril Jaquier"
-__version__ = "$Revision$"
-__date__ = "$Date$"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"
-import getopt, sys, logging
+import getopt, sys, logging, os
# Inserts our own modules path first in the list
# fix for bug #343821
-sys.path.insert(1, "/usr/share/fail2ban")
+if os.path.abspath(__file__).startswith('/usr/'):
+ # makes sense to use system-wide library iff -server is also under /usr/
+ sys.path.insert(1, "/usr/share/fail2ban")
from common.version import version
from server.server import Server
@@ -61,7 +57,7 @@ class Fail2banServer:
def dispVersion(self):
print "Fail2Ban v" + version
print
- print "Copyright (c) 2004-2008 Cyril Jaquier"
+ print "Copyright (c) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors"
print "Copyright of modifications held by their respective authors."
print "Licensed under the GNU General Public License v2 (GPL)."
print
diff --git a/fail2ban-testcases b/fail2ban-testcases
index 58ad7887..aaf78525 100755
--- a/fail2ban-testcases
+++ b/fail2ban-testcases
@@ -20,12 +20,8 @@
# along with Fail2Ban; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# Author: Cyril Jaquier
-
__author__ = "Cyril Jaquier"
-__version__ = "$Revision$"
-__date__ = "$Date$"
-__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
+__copyright__ = "Copyright (c) 2004 Cyril Jaquier, 2012- Yaroslav Halchenko"
__license__ = "GPL"
diff --git a/setup.py b/setup.py
index 62921d04..af7bf7f4 100755
--- a/setup.py
+++ b/setup.py
@@ -18,13 +18,7 @@
# along with Fail2Ban; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# Author: Cyril Jaquier
-#
-# $Revision$
-
__author__ = "Cyril Jaquier"
-__version__ = "$Revision$"
-__date__ = "$Date$"
__copyright__ = "Copyright (c) 2004 Cyril Jaquier"
__license__ = "GPL"