diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-03-13 05:51:31 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-03-13 05:51:31 +0000 |
commit | bc93e0caf2df9d1d5af3f3ea6dfff0b71cd9b296 (patch) | |
tree | 88ef4f97ac910f6723887c38a3a2224d899120bb | |
parent | 1a6beaf5908b894268902080d785d462d05dd3c2 (diff) |
Don't trust the environment if issetugid()
-rw-r--r-- | lib/librthread/rthread_debug.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/librthread/rthread_debug.c b/lib/librthread/rthread_debug.c index aefc34da834..bca185afbaf 100644 --- a/lib/librthread/rthread_debug.c +++ b/lib/librthread/rthread_debug.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rthread_debug.c,v 1.2 2011/11/06 11:48:59 guenther Exp $ */ +/* $OpenBSD: rthread_debug.c,v 1.3 2012/03/13 05:51:30 guenther Exp $ */ /* $snafu: rthread_debug.c,v 1.2 2004/12/09 18:41:44 marc Exp $ */ /* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */ @@ -64,6 +64,8 @@ _rthread_debug_init(void) char *envp; char *rem; + if (issetugid()) + return; envp = getenv(RTHREAD_ENV_DEBUG); if (envp) { _rthread_debug_level = (int) strtol(envp, &rem, 0); |