Module Name:    src
Committed By:   bouyer
Date:           Thu Aug 31 08:24:43 UTC 2017

Modified Files:
        src/lib/libpthread [netbsd-8]: pthread.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #232):
        lib/libpthread/pthread.c: revision 1.149
Do not look at environmental variables for suid/guid binaries.


To generate a diff of this commit:
cvs rdiff -u -r1.147.8.1 -r1.147.8.2 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.147.8.1 src/lib/libpthread/pthread.c:1.147.8.2
--- src/lib/libpthread/pthread.c:1.147.8.1	Tue Aug 29 09:43:16 2017
+++ src/lib/libpthread/pthread.c	Thu Aug 31 08:24:43 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread.c,v 1.147.8.1 2017/08/29 09:43:16 bouyer Exp $	*/
+/*	$NetBSD: pthread.c,v 1.147.8.2 2017/08/31 08:24:43 bouyer 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.147.8.1 2017/08/29 09:43:16 bouyer Exp $");
+__RCSID("$NetBSD: pthread.c,v 1.147.8.2 2017/08/31 08:24:43 bouyer Exp $");
 
 #define	__EXPOSE_STACK	1
 
@@ -1366,6 +1366,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 &&

Reply via email to