On Sun, Jan 31, 2010 at 7:46 PM, Chia-I Wu <olva...@gmail.com> wrote: > On Mon, Feb 1, 2010 at 9:15 AM, Mike Stroyan <m...@lunarg.com> wrote: >> The changes to load EGL drivers by pattern matching had the side effect of >> not >> looking in the directories specified by LD_LIBRARY_PATH or -rpath or >> ldconfig. >> This patch changes the search to first look in the directories listed in >> LD_LIBRARY_PATH. To do that it moves the possible addition of a path prefix >> from make_library_path() into open_library(). >> This patch doesn't add searches in the -rpath or ldconfig directories. >> Those would be more difficult (or impossible) to determine in a portable >> manner. > I am leaning toward something similar to how DRI drivers are loaded: Allow the > users to specify the search directory through EGL_DRIVERS_PATH.
A specific environment variable may be the best option if -rpath and ldconfig cannot be used. (They should be added into docs/envvars.html .) > It also seems EGL will need a check for setuid in both EGL_DRIVER (my fault) > and the proposed EGL_DRIVERS_PATH. A setuid/setgid check is a very good idea for allowing both *PATH and EGL_DRIVER. (geteuid() == getuid()) && getegid () == getgid ()) will test for that. >> The patch also tightens up the library suffix test with a specific >> match for the suffix >> at the end of the EGL_DRIVER name. > I want to avoid suffix matching somehow. Do you have a specific example why > the change is needed? Or, will the following change suffice? > > p = strrchr(name, '.'); > need_suffix = (!p || (strchr(p + 1, '/') != NULL)); I was thinking about future library names that might contain decimal points such as egl_x11_i999.5.so. Leaving the .so suffix off would not work as make_library_path would just check for any appearance of '.'. Of course, just setting EGL_DRIVER to include .so suffix would avoid the issue. -- Mike Stroyan - Software Architect LunarG, Inc. - The Graphics Experts Cell: (970) 219-7905 Email: m...@lunarg.com Website: http://www.lunarg.com ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev