tzset_basic: only call issetugid(2) if TZ has changed
authormillert <millert@openbsd.org>
Thu, 4 Apr 2024 02:20:01 +0000 (02:20 +0000)
committermillert <millert@openbsd.org>
Thu, 4 Apr 2024 02:20:01 +0000 (02:20 +0000)
commit17f67a8b6f5830e2d623d39a772b461a5cb3bd05
tree2f9e679c9e545d6cb7726ce83dc4f04eeea6f49f
parent4dfdb00c229dbc4c06877088ae275409b75e48ed
tzset_basic: only call issetugid(2) if TZ has changed
If we are just going to return without parsing TZ, there is no need
to call issetugid(2) first.  We only need to call issetugid(2) the
first time TZ is checked or when the value of TZ has changed.
Previously, we called issetugid(2) for every call to the functions
described by localtime(3).  OK deraadt@
lib/libc/time/localtime.c