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:
Paul van Tilburg 2011-03-12 01:44:24 +01:00
parent e7dc498c17
commit 40a7b53203
3 changed files with 8 additions and 3 deletions

View File

@ -15,7 +15,7 @@ module Ildus
class Server < GServer
# The interface to listen specified default by the hostname.
DEFAULT_HOST = '::'
DEFAULT_HOST = '0.0.0.0'
# The maximal number of connections.
MAX_CONNECTIONS = 20
@ -30,6 +30,7 @@ module Ildus
parse_config(config_file)
super(config['port'], DEFAULT_HOST, 20, $stderr, true, false)
self.audit = true
end
def serve(io)

View File

@ -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>
#

View File

@ -86,7 +86,7 @@ module Ildus
end
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
@io.each_line do |line|
@ -151,6 +151,10 @@ module Ildus
prot_msg(code, *args)
end
def own_hostname
Socket.gethostbyname(Socket.gethostname).first
end
##################
# Commands methods