On 2007-07-24, Cami Sardinha <[EMAIL PROTECTED]> wrote: > > The resolution could take place before the chroot() occurs.
I changed it to resolve the name once it reads it from the config file. Now my completely empty CHROOT=/var/empty/policyd works fine. -------------------------------------------------------------------------- --- generic.c.original 2007-07-24 15:48:36.000000000 +0200 +++ generic.c 2007-07-24 16:34:25.000000000 +0200 @@ -522,6 +522,12 @@ logmessage("malloc(): %s\n", strerror(errno)); exit(-1); } + struct hostent *he = gethostbyname(MYSQLHOST); + if (he == NULL) { + logmessage("gethostbyname() for MYSQLHOST failed\n", strerror(errno)); + exit(-1); + } else + MYSQLHOST = inet_ntoa( *( struct in_addr*) he->h_addr_list[0]); } /* MYSQL DATABASE */ -------------------------------------------------------------------------- -jf ------------------------------------------------------------------------- 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