Module Name: src Committed By: joerg Date: Sun Jul 2 17:13:08 UTC 2017
Modified Files: src/lib/libpthread: pthread.c Log Message: Do not look at environmental variables for suid/guid binaries. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/lib/libpthread/pthread.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libpthread/pthread.c diff -u src/lib/libpthread/pthread.c:1.148 src/lib/libpthread/pthread.c:1.149 --- src/lib/libpthread/pthread.c:1.148 Sun Jul 2 16:41:32 2017 +++ src/lib/libpthread/pthread.c Sun Jul 2 17:13:07 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.148 2017/07/02 16:41:32 joerg Exp $ */ +/* $NetBSD: pthread.c,v 1.149 2017/07/02 17:13:07 joerg Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: pthread.c,v 1.148 2017/07/02 16:41:32 joerg Exp $"); +__RCSID("$NetBSD: pthread.c,v 1.149 2017/07/02 17:13:07 joerg Exp $"); #define __EXPOSE_STACK 1 @@ -1386,6 +1386,9 @@ pthread__getenv(const char *name) extern char **environ; size_t l_name, offset; + if (issetugid()) + return (NULL); + l_name = strlen(name); for (offset = 0; environ[offset] != NULL; offset++) { if (strncmp(name, environ[offset], l_name) == 0 &&