diff options
author | 2005-02-22 10:52:17 +0000 | |
---|---|---|
committer | 2005-02-22 10:52:17 +0000 | |
commit | 99421cb1bffdad1920ea37f5fe0b9248bb0843e4 (patch) | |
tree | c7482fdc20189596b1a5eef3c32e78a533849623 | |
parent | Avoid spurious "globally exported" warning. Noted by jared r r spiegel. (diff) | |
download | wireguard-openbsd-99421cb1bffdad1920ea37f5fe0b9248bb0843e4.tar.xz wireguard-openbsd-99421cb1bffdad1920ea37f5fe0b9248bb0843e4.zip |
get timezone right before chroot() by calling tzset()
ok henning@
-rw-r--r-- | libexec/tftpd/tftpd.c | 5 |
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); |