Bundled of small fixes.
* Listen on 0.0.0.0, updates over IPv4 are crucial, and there is an IPv6-support bug in GServer. * Enable GServer logging (for now). * Fixed ildus/server/backend/ldap.rb header. * Make the welcome message (prot. 220) give the real hostname instead of the hardcoded "localhost".
This commit is contained in:
parent
e7dc498c17
commit
40a7b53203
|
@ -15,7 +15,7 @@ module Ildus
|
||||||
class Server < GServer
|
class Server < GServer
|
||||||
|
|
||||||
# The interface to listen specified default by the hostname.
|
# The interface to listen specified default by the hostname.
|
||||||
DEFAULT_HOST = '::'
|
DEFAULT_HOST = '0.0.0.0'
|
||||||
|
|
||||||
# The maximal number of connections.
|
# The maximal number of connections.
|
||||||
MAX_CONNECTIONS = 20
|
MAX_CONNECTIONS = 20
|
||||||
|
@ -30,6 +30,7 @@ module Ildus
|
||||||
parse_config(config_file)
|
parse_config(config_file)
|
||||||
|
|
||||||
super(config['port'], DEFAULT_HOST, 20, $stderr, true, false)
|
super(config['port'], DEFAULT_HOST, 20, $stderr, true, false)
|
||||||
|
self.audit = true
|
||||||
end
|
end
|
||||||
|
|
||||||
def serve(io)
|
def serve(io)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# = ildus/server/backend - ldap domain backend library
|
# = ildus/server/backend/ldap - ldap domain backend library
|
||||||
#
|
#
|
||||||
# Copyright (C) 2005 Paul van Tilburg <paul@luon.net>
|
# Copyright (C) 2005 Paul van Tilburg <paul@luon.net>
|
||||||
#
|
#
|
||||||
|
|
|
@ -86,7 +86,7 @@ module Ildus
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_client
|
def handle_client
|
||||||
prot_msg 220, "localhost", Program, Version, Time.now.to_s
|
prot_msg 220, own_hostname, Program, Version, Time.now.to_s
|
||||||
|
|
||||||
cmd_errs = 0
|
cmd_errs = 0
|
||||||
@io.each_line do |line|
|
@io.each_line do |line|
|
||||||
|
@ -151,6 +151,10 @@ module Ildus
|
||||||
prot_msg(code, *args)
|
prot_msg(code, *args)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def own_hostname
|
||||||
|
Socket.gethostbyname(Socket.gethostname).first
|
||||||
|
end
|
||||||
|
|
||||||
##################
|
##################
|
||||||
# Commands methods
|
# Commands methods
|
||||||
|
|
||||||
|
|
Reference in New Issue