Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread Do not look at environmental variables for su...
details: https://anonhg.NetBSD.org/src/rev/f3eec0d6acbc
branches: trunk
changeset: 354878:f3eec0d6acbc
user: joerg <joerg%NetBSD.org@localhost>
date: Sun Jul 02 17:13:07 2017 +0000
description:
Do not look at environmental variables for suid/guid binaries.
diffstat:
lib/libpthread/pthread.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r fa4419746479 -r f3eec0d6acbc lib/libpthread/pthread.c
--- a/lib/libpthread/pthread.c Sun Jul 02 16:41:32 2017 +0000
+++ b/lib/libpthread/pthread.c Sun Jul 02 17:13:07 2017 +0000
@@ -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 @@
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 &&
Home |
Main Index |
Thread Index |
Old Index