diff options
author | 2015-10-19 07:18:31 +0000 | |
---|---|---|
committer | 2015-10-19 07:18:31 +0000 | |
commit | 61125a9027e62f38376287c74aec91cff0f67f12 (patch) | |
tree | a354985359d4d12ac25afab88891adaa3f4dcac3 | |
parent | Can't assert "module->fd >= 0" in radiusd_stop() since the module may (diff) | |
download | wireguard-openbsd-61125a9027e62f38376287c74aec91cff0f67f12.tar.xz wireguard-openbsd-61125a9027e62f38376287c74aec91cff0f67f12.zip |
Call tzset() before dropping the priviledge to use correct timezone.
-rw-r--r-- | usr.sbin/radiusd/radiusd_module.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/radiusd/radiusd_module.c b/usr.sbin/radiusd/radiusd_module.c index 03b161661c7..a75ec29cd82 100644 --- a/usr.sbin/radiusd/radiusd_module.c +++ b/usr.sbin/radiusd/radiusd_module.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusd_module.c,v 1.4 2015/08/02 23:29:27 yasuoka Exp $ */ +/* $OpenBSD: radiusd_module.c,v 1.5 2015/10/19 07:18:31 yasuoka Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> @@ -150,6 +150,8 @@ module_drop_privilege(struct module_base *base) { struct passwd *pw; + tzset(); + /* Drop the privilege */ if ((pw = getpwnam(RADIUSD_USER)) == NULL) goto on_fail; |