- utils.c: preparation for chroot() (consider syslog)

This commit is contained in:
Thomas Ries
2004-10-13 20:43:24 +00:00
parent a53744ce81
commit 0f6e6ce101
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -1,5 +1,6 @@
0.5.9
=====
13-Oct-2004: - utils.c: preparation for chroot() (consider syslog)
09-Oct-2004: - comp_osip.c: libosip2-2.0.9 compatibility (There SEEM
to happen some API changes forward and backward:
osip_message_to_str, osip_body_to_str,
+1 -1
View File
@@ -179,6 +179,7 @@ int main (int argc, char *argv[])
/*
* Init stuff
*/
INFO(PACKAGE"-"VERSION"-"BUILDSTR" started");
/* read the config file */
if (read_config(configfile, config_search) == STS_FAILURE) exit(1);
@@ -245,7 +246,6 @@ int main (int argc, char *argv[])
/* initialize the registration facility */
register_init();
INFO(PACKAGE"-"VERSION"-"BUILDSTR" started");
/*
* silence the log - if so required...
*/
+3 -3
View File
@@ -247,12 +247,12 @@ void secure_enviroment (void) {
* as it loads some dynamic libraries. Once chrootet
* these libraries will *not* be found and gethostbyname()
* calls will simply fail (return NULL pointer and h_errno=0).
* Also (at least for FreeBSD) syslog() needs to be called
* before chroot()ing - this is done in main() by an INFO().
* Took me a while to figure THIS one out
*/
struct in_addr dummy;
DEBUGC(DBCLASS_DNS, "Initializing DNS, the following DNS "
"failure is normal, don't worry");
get_ip_by_host("foobar", &dummy);
get_ip_by_host("localhost", &dummy);
DEBUGC(DBCLASS_CONFIG,"chrooting to %s",
configuration.chrootjail);
sts = chroot(configuration.chrootjail);