summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2008-03-09 16:21:29 -0400
committerKristian Høgsberg <[email protected]>2008-03-09 16:29:17 -0400
commit03db9c8acb83f7072681876ce5e8d73e1ec922e9 (patch)
tree4f01495d14f9d61bc613ca2a29246f58f101bfca /src
parenteecb3ab7c64764464d20a7c30279c9a3b26b0a7f (diff)
libGL: Fall back to DEFAULT_DRIVER_DIR properly.
After commit 6fd82f6fbd208dc7b1839ea408a5fb28589ee622, we would overwrite the libPath default value with NULL if libGL was running non-setuid and none of the env vars were set. Thanks to Magnus Kessler <[email protected]> for spotting it.
Diffstat (limited to 'src')
-rw-r--r--src/glx/x11/dri_glx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index fc1c91d31f3..6c915d800e0 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -145,13 +145,14 @@ static void *OpenDriver(const char *driverName)
/* Attempt to make sure libGL symbols will be visible to the driver */
glhandle = dlopen("libGL.so.1", RTLD_NOW | RTLD_GLOBAL);
- libPaths = DEFAULT_DRIVER_DIR;
if (geteuid() == getuid()) {
/* don't allow setuid apps to use LIBGL_DRIVERS_PATH */
libPaths = getenv("LIBGL_DRIVERS_PATH");
if (!libPaths)
libPaths = getenv("LIBGL_DRIVERS_DIR"); /* deprecated */
}
+ if (libPaths == NULL)
+ libPaths = DEFAULT_DRIVER_DIR;
handle = NULL;
for (p = libPaths; *p; p = next) {