Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[xsrc/netbsd-9]: xsrc/external/mit/MesaLib/dist/src Pull up following revisio...
details: https://anonhg.NetBSD.org/xsrc/rev/eaa8b8d5a51f
branches: netbsd-9
changeset: 10414:eaa8b8d5a51f
user: martin <martin%NetBSD.org@localhost>
date: Thu Dec 12 12:26:19 2019 +0000
description:
Pull up following revision(s) (requested by maya in ticket #526):
external/mit/MesaLib/dist/src/intel/dev/gen_device_info.c: revision 1.5
external/mit/MesaLib/dist/src/loader/loader.c: revision 1.2
external/mit/MesaLib/dist/src/mesa/main/context.c: revision 1.8
external/mit/MesaLib/dist/src/util/disk_cache.c: revision 1.4
(all via patch)
external/mit/MesaLib/dist/src/egl/drivers/dri2/egl_dri2.c (apply patch)
external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c (apply patch)
external/mit/MesaLib/dist/src/glx/dri_common.c (apply patch)
Wherever we test for setuid, also test for setgid.
Inspired by a diff to openbsd but with a few more instances.
diffstat:
external/mit/MesaLib/dist/src/egl/drivers/dri2/egl_dri2.c | 2 +-
external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c | 2 +-
external/mit/MesaLib/dist/src/glx/dri_common.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r bd40b57a2c30 -r eaa8b8d5a51f external/mit/MesaLib/dist/src/egl/drivers/dri2/egl_dri2.c
--- a/external/mit/MesaLib/dist/src/egl/drivers/dri2/egl_dri2.c Thu Dec 12 11:36:34 2019 +0000
+++ b/external/mit/MesaLib/dist/src/egl/drivers/dri2/egl_dri2.c Thu Dec 12 12:26:19 2019 +0000
@@ -491,7 +491,7 @@
const __DRIextension **(*get_extensions)(void);
search_paths = NULL;
- if (geteuid() == getuid()) {
+ if (!issetugid()) {
/* don't allow setuid apps to use LIBGL_DRIVERS_PATH */
search_paths = getenv("LIBGL_DRIVERS_PATH");
}
diff -r bd40b57a2c30 -r eaa8b8d5a51f external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c
--- a/external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c Thu Dec 12 11:36:34 2019 +0000
+++ b/external/mit/MesaLib/dist/src/gbm/backends/dri/gbm_dri.c Thu Dec 12 12:26:19 2019 +0000
@@ -310,7 +310,7 @@
search_paths = NULL;
/* don't allow setuid apps to use LIBGL_DRIVERS_PATH or GBM_DRIVERS_PATH */
- if (geteuid() == getuid()) {
+ if (!issetugid()) {
/* Read GBM_DRIVERS_PATH first for compatibility, but LIBGL_DRIVERS_PATH
* is recommended over GBM_DRIVERS_PATH.
*/
diff -r bd40b57a2c30 -r eaa8b8d5a51f external/mit/MesaLib/dist/src/glx/dri_common.c
--- a/external/mit/MesaLib/dist/src/glx/dri_common.c Thu Dec 12 11:36:34 2019 +0000
+++ b/external/mit/MesaLib/dist/src/glx/dri_common.c Thu Dec 12 12:26:19 2019 +0000
@@ -106,7 +106,7 @@
glhandle = dlopen(GL_LIB_NAME, RTLD_NOW | RTLD_GLOBAL);
libPaths = NULL;
- if (geteuid() == getuid()) {
+ if (!issetugid()) {
/* don't allow setuid apps to use LIBGL_DRIVERS_PATH */
libPaths = getenv("LIBGL_DRIVERS_PATH");
if (!libPaths)
Home |
Main Index |
Thread Index |
Old Index