On Wed, 25 Jul 2007, Jan-Frode Myklebust wrote:

> On 2007-07-24, Antonio Querubin <[EMAIL PROTECTED]> wrote:
>>
>> The above would add an IPv4 dependency back into the code because of
>> gethostbyname(), inet_ntoa(), and struct in_addr.  At some point in the
>> future your MySQL server may have an IPv6 address.
>
> Sorry, didn't realize that. Would a getaddrinfo/inet_ntop version be
> interesting ?

That would certainly be better.  If you implement this using 
getaddrinfo/w_inet_ntop then you probably should loop through all the 
returned addresses and attempt a connection to the mysql port.  Break out 
of the loop on the first successful connection.

>> More importantly though, shouldn't this problem be resolved at the mysql
>> level since mysql_real_connect() doesn't require a numeric IP address for
>> the server target?
>
> Sure, if I could find out how to make it resolve this within the chroot..
> Any ideas ?

Specify the address instead of the hostname for now?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
policyd-users mailing list
policyd-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/policyd-users

Reply via email to