bug: Partial results from DB lookup causing parsing problems
Simon Fraser <[email protected]>
| Newsgroups | gmane.mail.perdition.user |
|---|---|
| Message-ID | <[email protected]> |
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). Thanks, Simon. -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. ______________________________________________ Perdition-users mailing list [email protected] http://lists.vergenet.net/listinfo/perdition-users