From 39b0665efe603d6cbb994d52f9f3dbfef1c06949 Mon Sep 17 00:00:00 2001 From: lostcontrol Date: Sun, 26 Nov 2006 22:22:54 +0000 Subject: [PATCH] - Fixed bug with the "socket" option git-svn-id: https://fail2ban.svn.sourceforge.net/svnroot/fail2ban/trunk@475 a942ae1a-1317-0410-a47c-b1dcaea8d605 --- CHANGELOG | 2 ++ fail2ban-client | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e0bbf79e..11888001 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -25,6 +25,8 @@ ver. 0.7.5 (2006/??/??) - ??? and supported - Fixed exception when calling fail2ban-server with unknown option +- Fixed Debian bug 400162. The "socket" option is now handled + correctly by fail2ban-client ver. 0.7.4 (2006/11/01) - beta ---------- diff --git a/fail2ban-client b/fail2ban-client index c3f2fdec..0cc9112e 100755 --- a/fail2ban-client +++ b/fail2ban-client @@ -169,7 +169,8 @@ class Fail2banClient: logSys.error("Server already running") return False else: - self.__startServerAsync(self.__conf["force"]) + self.__startServerAsync(self.__conf["socket"], + self.__conf["force"]) # Read the config while the server is starting self.__readConfig() try: @@ -199,14 +200,19 @@ class Fail2banClient: # # Start the Fail2ban server in daemon mode. - def __startServerAsync(self, force = False): + def __startServerAsync(self, socket, force = False): args = list() args.append("fail2ban-server") + # Start in background mode. args.append("-b") + # Set the socket path. + args.append("-s") + args.append(socket) + # Force the execution if needed. if force: args.append("-x") - + print args pid = os.fork() if pid == 0: try: