summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2005-02-22 10:52:18 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2005-02-22 10:52:18 +0000
commit5a01bae069c9d36f6c8c579b7ab6ff2c2612c576 (patch)
tree2d02650e572ea9b99f58e7b05d151d2870d8f4f7
parent8d38d0e0fc4cd49025d19efe66f1baff1333a929 (diff)
get timezone right before chroot() by calling tzset()
ok henning@
-rw-r--r--libexec/tftpd/tftpd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c
index 2033e5a15bc..c6528ac8b82 100644
--- a/libexec/tftpd/tftpd.c
+++ b/libexec/tftpd/tftpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftpd.c,v 1.36 2004/09/18 06:38:02 deraadt Exp $ */
+/* $OpenBSD: tftpd.c,v 1.37 2005/02/22 10:52:17 otto Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
@@ -37,7 +37,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)tftpd.c 5.13 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$OpenBSD: tftpd.c,v 1.36 2004/09/18 06:38:02 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: tftpd.c,v 1.37 2005/02/22 10:52:17 otto Exp $";
#endif /* not lint */
/*
@@ -190,6 +190,7 @@ main(int argc, char *argv[])
syslog(LOG_ERR, "too many -s directories");
exit(1);
}
+ tzset();
if (chroot(dirs[0])) {
syslog(LOG_ERR, "chroot %s: %m", dirs[0]);
exit(1);