diff options
Diffstat (limited to 'net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch')
-rw-r--r-- | net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch b/net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch new file mode 100644 index 000000000000..a254a9d23c9a --- /dev/null +++ b/net-nntp/hellanzb/files/hellanzb-0.13-Choose_interface_to_bind_on.patch @@ -0,0 +1,52 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 001-Choose_interface_to_bind_on +## by Adam Cécile (Le_Vert) <gandalf@le-vert.net> +## +## DP: Add a Hellanzb.XMLRPC_SERVER option which allowusers to set on which +## DP: IP address XMLRPC server will be binded. + +@DPATCH@ +diff -u hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py.new +--- hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py 2007-01-30 03:51:05.000000000 +0100 ++++ hellanzb-0.11/Hellanzb/HellaXMLRPC/__init__.py.new 2007-02-10 15:19:14.000000000 +0100 +@@ -597,9 +597,9 @@ + try: + if SECURE: + secure = HtPasswdWrapper(hxmlrpcs, 'hellanzb', Hellanzb.XMLRPC_PASSWORD, 'hellanzb XML RPC') +- reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(secure)) ++ reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(secure), 50, Hellanzb.XMLRPC_SERVER_BIND) + else: +- reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(hxmlrpcs)) ++ reactor.listenTCP(Hellanzb.XMLRPC_PORT, Site(hxmlrpcs), 50, Hellanzb.XMLRPC_SERVER_BIND) + except CannotListenError, cle: + error(str(cle)) + raise FatalError('Cannot bind to XML RPC port, is another hellanzb queue daemon already running?') + +diff -u hellanzb-0.11/etc/hellanzb.conf.sample hellanzb-0.11/etc/hellanzb.conf.sample.new +--- hellanzb-0.11/etc/hellanzb.conf.sample 2007-01-30 03:51:05.000000000 +0100 ++++ hellanzb-0.11/etc/hellanzb.conf.sample.new 2007-02-10 15:18:10.000000000 +0100 +@@ -151,6 +151,10 @@ + # Hostname for the XMLRPC client to connect to. By default, localhost + Hellanzb.XMLRPC_SERVER = 'localhost' + ++# IP address on which the XMLRPC Server will be binded to. ++# Type '0.0.0.0' for any interfaces, '127.0.0.1' will disable remote access ++Hellanzb.XMLRPC_SERVER_BIND = '127.0.0.1' ++ + # Port number the XML RPC server will listen on, and the client will connect to. + # Set to 'None' (without the quotes!) for no XML RPC server + Hellanzb.XMLRPC_PORT = 8760 +diff -u hellanzb-0.11/Hellanzb/Core.py hellanzb-0.11/Hellanzb/Core.py.new +--- hellanzb-0.11/Hellanzb/Core.py 2007-01-30 03:51:05.000000000 +0100 ++++ hellanzb-0.11/Hellanzb/Core.py.new 2007-02-10 15:18:10.000000000 +0100 +@@ -113,7 +106,9 @@ + + if not hasattr(Hellanzb, 'SKIP_UNRAR') or Hellanzb.SKIP_UNRAR is None: + Hellanzb.SKIP_UNRAR = False +- ++ if not hasattr(Hellanzb, 'XMLRPC_SERVER_BIND') or Hellanzb.XMLRPC_SERVER_BIND is None: ++ print 'Warning: Hellanzb.XMLRPC_SERVER_BIND is not set, bind to 127.0.0.1' ++ Hellanzb.XMLRPC_SERVER_BIND = '127.0.0.1' + + if not hasattr(Hellanzb, 'SMART_PAR'): + Hellanzb.SMART_PAR = True |