[Mesa-dev] [PATCH v2] gbm: Replace GBM_DRIVERS_PATH with LIBGL_DRIVERS_PATH
Kristian Høgsberg
krh at bitplanet.net
Tue Jul 22 14:15:18 PDT 2014
On Tue, Jul 22, 2014 at 11:43 AM, Dylan Baker <baker.dylan.c at gmail.com> wrote:
> GBM_DRIVERS_PATH is not documented, and only used to set the location of
> gbm drivers, while LIBGL_DRIVERS_PATH is used for everything else, and
> is documented.
>
> Generally this split leads to confusion as to why gbm doesn't work.
>
> This patch makes LIBGL_DRIVERS_PATH the main variable, but uses
> GBM_DRIVERS_PATH as a fallback if LIBGL_DRIVERS_PATH is NULL.
>
> v2: - Use GBM_DRIVERS_PATH as a fallback
>
> Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
> ---
> src/gbm/backends/dri/gbm_dri.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
> index 347bc99..3e4851c 100644
> --- a/src/gbm/backends/dri/gbm_dri.c
> +++ b/src/gbm/backends/dri/gbm_dri.c
> @@ -211,9 +211,16 @@ dri_load_driver(struct gbm_dri_device *dri)
> char *get_extensions_name;
>
> search_paths = NULL;
> + /* don't allow setuid apps to use LIBGL_DRIVERS_PATH */
> if (geteuid() == getuid()) {
> - /* don't allow setuid apps to use GBM_DRIVERS_PATH */
> - search_paths = getenv("GBM_DRIVERS_PATH");
> + search_paths = getenv("LIBGL_DRIVERS_PATH");
> +
> + /* fallback path for compatability, GBM_DRIVERS_PATH should be
compatibility
I don't even know that we ever need to drop GBM_DRIVERS_PATH, it's
pretty harmless. Either way,
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
> + * dropped eventually
> + */
> + if (search_paths == NULL) {
> + search_paths = getenv("GBM_DRIVERS_PATH");
> + }
> }
> if (search_paths == NULL)
> search_paths = DEFAULT_DRIVER_DIR;
> --
> 2.0.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list