23 Oct 2008 14:33
bug: Partial results from DB lookup causing parsing problems
Simon Fraser <srf <at> sanger.ac.uk>
2008-10-23 12:33:09 GMT
2008-10-23 12:33:09 GMT
Hi folks, I'm newly subscribed to this list, and while I've searched for a mention of this before and come up with nothing, I apologise if I'm duplicating a report. I'm using perdition-1.17.1 with perditiondb_ldap. Due to the nature of our site, some users will have a mailhost configured in here, and some will not. I am hoping to use the outgoing_server configuration option as a default should the server return a partial response, since one of our existing systems will break if we started adding this to all the currently empty fields. This works if the user had a mailhost set, but was refusing to use the outgoing_server option if they did not, instead attempting to connect to the person's username, treating it as a hostname. Omitting the port works whether the server is set or not. I have tracked down this problem to user_server_port_strn_assign in getserver.c. This function appears to be dual-purpose, used for both parsing the outgoing_server option in the configuration file, and also for parsing the string returned by dbserver_get. Since these have a slightly different format (hostname[:port] vs username[<delimiter>hostname[:port]]), it gets confused when the string returned from the DB doesn't contain a server. It falls through into its configuration parsing option at the end, setting (*usp)->server to (*usp)->user (the start of the string), and so the connection attempts gethostbyname(username).(Continue reading)
RSS Feed