summaryrefslogtreecommitdiffstats
path: root/lib/libc/time
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-08-25 10:11:02 +0000
committerderaadt <deraadt@openbsd.org>1996-08-25 10:11:02 +0000
commitfdaed31805398a3d78b467d35d49e1f240f7470a (patch)
tree891e62e6e172efe31e0ab52570cab9599e07e090 /lib/libc/time
parentMakefile.in: break mandir creation out of install-dir; (diff)
downloadwireguard-openbsd-fdaed31805398a3d78b467d35d49e1f240f7470a.tar.xz
wireguard-openbsd-fdaed31805398a3d78b467d35d49e1f240f7470a.zip
use issetugid()
Diffstat (limited to 'lib/libc/time')
-rw-r--r--lib/libc/time/localtime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/time/localtime.c b/lib/libc/time/localtime.c
index 83c56a8468a..ea5f177001d 100644
--- a/lib/libc/time/localtime.c
+++ b/lib/libc/time/localtime.c
@@ -1,5 +1,5 @@
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: localtime.c,v 1.4 1996/08/19 08:34:50 tholo Exp $";
+static char rcsid[] = "$OpenBSD: localtime.c,v 1.5 1996/08/25 10:11:11 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -282,7 +282,7 @@ register struct state * const sp;
if (name[0] == ':')
++name;
doaccess = name[0] == '/';
- if (!doaccess) {
+ if (!doaccess && issetugid() == 0) {
if ((p = TZDIR) == NULL)
return -1;
if ((strlen(p) + strlen(name) + 1) >= sizeof fullname)