Commit 6286983c authored by Mark Andrews's avatar Mark Andrews

1550. [port] Call tzset(), if available, before calling chroot().

parent d0aebc5a
1550. [port] Call tzset(), if available, before calling chroot().
1549. [func] named-checkzone can now write out the zone contents 1549. [func] named-checkzone can now write out the zone contents
in a easily parsable format (-D and -o). in a easily parsable format (-D and -o).
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: acconfig.h,v 1.41 2003/07/25 05:08:50 marka Exp $ */ /* $Id: acconfig.h,v 1.42 2004/01/07 05:48:14 marka Exp $ */
/*** /***
*** This file is not to be included by any public header files, because *** This file is not to be included by any public header files, because
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
/* define if chroot() is available */ /* define if chroot() is available */
#undef HAVE_CHROOT #undef HAVE_CHROOT
/* define if tzset() is available */
#undef HAVE_TZSET
/* define if struct addrinfo exists */ /* define if struct addrinfo exists */
#undef HAVE_ADDRINFO #undef HAVE_ADDRINFO
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: main.c,v 1.131 2003/09/24 23:20:54 marka Exp $ */ /* $Id: main.c,v 1.132 2004/01/07 05:48:15 marka Exp $ */
#include <config.h> #include <config.h>
...@@ -537,6 +537,11 @@ setup(void) { ...@@ -537,6 +537,11 @@ setup(void) {
*/ */
ns_os_inituserinfo(ns_g_username); ns_os_inituserinfo(ns_g_username);
/*
* Initialize time conversion information
*/
ns_os_tzset();
ns_os_chroot(ns_g_chrootdir); ns_os_chroot(ns_g_chrootdir);
/* /*
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: os.h,v 1.19 2002/05/03 05:28:26 marka Exp $ */ /* $Id: os.h,v 1.20 2004/01/07 05:48:15 marka Exp $ */
#ifndef NS_OS_H #ifndef NS_OS_H
#define NS_OS_H 1 #define NS_OS_H 1
...@@ -52,4 +52,7 @@ ns_os_gethostname(char *buf, size_t len); ...@@ -52,4 +52,7 @@ ns_os_gethostname(char *buf, size_t len);
void void
ns_os_shutdownmsg(char *command, isc_buffer_t *text); ns_os_shutdownmsg(char *command, isc_buffer_t *text);
void
ns_os_tzset(void);
#endif /* NS_OS_H */ #endif /* NS_OS_H */
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: os.c,v 1.62 2002/12/13 02:51:39 marka Exp $ */ /* $Id: os.c,v 1.63 2004/01/07 05:48:15 marka Exp $ */
#include <config.h> #include <config.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -598,3 +598,10 @@ ns_os_shutdownmsg(char *command, isc_buffer_t *text) { ...@@ -598,3 +598,10 @@ ns_os_shutdownmsg(char *command, isc_buffer_t *text) {
if (n < isc_buffer_availablelength(text)) if (n < isc_buffer_availablelength(text))
isc_buffer_add(text, n); isc_buffer_add(text, n);
} }
void
ns_os_tzset(void) {
#ifdef HAVE_TZSET
tzset();
#endif
}
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: os.h,v 1.6 2002/05/03 05:28:29 marka Exp $ */ /* $Id: os.h,v 1.7 2004/01/07 05:48:15 marka Exp $ */
#ifndef NS_OS_H #ifndef NS_OS_H
#define NS_OS_H 1 #define NS_OS_H 1
...@@ -52,4 +52,7 @@ ns_os_gethostname(char *buf, size_t len); ...@@ -52,4 +52,7 @@ ns_os_gethostname(char *buf, size_t len);
void void
ns_os_shutdownmsg(char *command, isc_buffer_t *text); ns_os_shutdownmsg(char *command, isc_buffer_t *text);
void
ns_os_tzset(void);
#endif /* NS_OS_H */ #endif /* NS_OS_H */
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: os.c,v 1.17 2002/08/03 01:31:48 mayer Exp $ */ /* $Id: os.c,v 1.18 2004/01/07 05:48:15 marka Exp $ */
#include <config.h> #include <config.h>
#include <stdarg.h> #include <stdarg.h>
...@@ -266,3 +266,10 @@ ns_os_shutdownmsg(char *command, isc_buffer_t *text) { ...@@ -266,3 +266,10 @@ ns_os_shutdownmsg(char *command, isc_buffer_t *text) {
UNUSED(command); UNUSED(command);
UNUSED(text); UNUSED(text);
} }
void
ns_os_tzset(void) {
#ifdef HAVE_TZSET
tzset();
#endif
}
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/ */
/* $Id: config.h.in,v 1.55 2003/07/25 05:10:21 marka Exp $ */ /* $Id: config.h.in,v 1.56 2004/01/07 05:48:14 marka Exp $ */
/*** /***
*** This file is not to be included by any public header files, because *** This file is not to be included by any public header files, because
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
/* define if chroot() is available */ /* define if chroot() is available */
#undef HAVE_CHROOT #undef HAVE_CHROOT
/* define if tzset() is available */
#undef HAVE_TZSET
/* define if struct addrinfo exists */ /* define if struct addrinfo exists */
#undef HAVE_ADDRINFO #undef HAVE_ADDRINFO
......
...@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl ...@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl AC_DIVERT_POP()dnl
AC_REVISION($Revision: 1.349 $) AC_REVISION($Revision: 1.350 $)
AC_INIT(lib/dns/name.c) AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13) AC_PREREQ(2.13)
...@@ -1674,6 +1674,11 @@ case "$enable_linux_caps" in ...@@ -1674,6 +1674,11 @@ case "$enable_linux_caps" in
esac esac
AC_CHECK_HEADERS(sys/prctl.h) AC_CHECK_HEADERS(sys/prctl.h)
#
# Time Zone Stuff
#
AC_CHECK_FUNC(tzset, AC_DEFINE(HAVE_TZSET))
# #
# BSD/OS, and perhaps some others, don't define rlim_t. # BSD/OS, and perhaps some others, don't define rlim_t.
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment