diff options
author | Jakob Schlyter <jakob@cvs.openbsd.org> | 2003-01-20 21:52:47 +0000 |
---|---|---|
committer | Jakob Schlyter <jakob@cvs.openbsd.org> | 2003-01-20 21:52:47 +0000 |
commit | 48e2c77aa24c798f1094eefcfba2c46539704231 (patch) | |
tree | a86fb152bca715d506234dd2b80a41bee3571c30 | |
parent | 9c5fd97312b1e7ec1a1cc357f601577085f147e2 (diff) |
call tzset() before chroot
-rw-r--r-- | usr.sbin/bind/bin/named/main.c | 5 | ||||
-rw-r--r-- | usr.sbin/bind/bin/named/unix/include/named/os.h | 3 | ||||
-rw-r--r-- | usr.sbin/bind/bin/named/unix/os.c | 7 | ||||
-rw-r--r-- | usr.sbin/bind/bin/named/win32/include/named/os.h | 3 | ||||
-rw-r--r-- | usr.sbin/bind/bin/named/win32/os.c | 7 |
5 files changed, 25 insertions, 0 deletions
diff --git a/usr.sbin/bind/bin/named/main.c b/usr.sbin/bind/bin/named/main.c index e56056fa107..c2c93ebd484 100644 --- a/usr.sbin/bind/bin/named/main.c +++ b/usr.sbin/bind/bin/named/main.c @@ -460,6 +460,11 @@ setup(void) { */ ns_os_inituserinfo(ns_g_username); + /* + * Initialize time conversion information + */ + ns_os_tzset(); + ns_os_chroot(ns_g_chrootdir); /* diff --git a/usr.sbin/bind/bin/named/unix/include/named/os.h b/usr.sbin/bind/bin/named/unix/include/named/os.h index 7a8529826ef..6f4e8d80043 100644 --- a/usr.sbin/bind/bin/named/unix/include/named/os.h +++ b/usr.sbin/bind/bin/named/unix/include/named/os.h @@ -46,4 +46,7 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time); void ns_os_shutdown(void); +void +ns_os_tzset(void); + #endif /* NS_OS_H */ diff --git a/usr.sbin/bind/bin/named/unix/os.c b/usr.sbin/bind/bin/named/unix/os.c index 4512c0666e1..1235406d713 100644 --- a/usr.sbin/bind/bin/named/unix/os.c +++ b/usr.sbin/bind/bin/named/unix/os.c @@ -537,3 +537,10 @@ ns_os_shutdown(void) { closelog(); cleanup_pidfile(); } + +void +ns_os_tzset(void) { +#ifdef HAVE_TZSET + tzset(); +#endif +} diff --git a/usr.sbin/bind/bin/named/win32/include/named/os.h b/usr.sbin/bind/bin/named/win32/include/named/os.h index 97ca1f5fe97..b0387f2d9d5 100644 --- a/usr.sbin/bind/bin/named/win32/include/named/os.h +++ b/usr.sbin/bind/bin/named/win32/include/named/os.h @@ -46,4 +46,7 @@ ns_os_writepidfile(const char *filename, isc_boolean_t first_time); void ns_os_shutdown(void); +void +ns_os_tzset(void); + #endif /* NS_OS_H */ diff --git a/usr.sbin/bind/bin/named/win32/os.c b/usr.sbin/bind/bin/named/win32/os.c index a9e2063bbd2..70c44b5c6bc 100644 --- a/usr.sbin/bind/bin/named/win32/os.c +++ b/usr.sbin/bind/bin/named/win32/os.c @@ -225,3 +225,10 @@ ns_os_shutdown(void) { cleanup_pidfile(); ntservice_shutdown(); /* This MUST be the last thing done */ } + +void +ns_os_tzset(void) { +#ifdef HAVE_TZSET + tzset(); +#endif +} |