Hi Orhun,

On 8/11/07, Orhun Birsoy <[EMAIL PROTECTED]> wrote:
> >
> > As J-S explained, the OSG is using this path list to look for plugins,
> > and these plugins will be nested in a osgPlugins-version directory,
> > the plugin won't be in the directly in the system directories or ones
> > pointed to directly by *LD_LIBRARY_PATH.
> >
>
> I'll say this and won't iterate this further.
>
> This is from man dlopen, 'If  the  environment variable
> LD_LIBRARY_PATH is defined to contain a colon-separated list of
> directories, then these are
> searched.  (As a security measure this variable is
>               ignored for set-user-ID and set-group-ID programs.)"
>
> so if your plugins are in /someplace/osgPlugins-whatever/ and your
> LD_LIBRARY_PATH is set to /someplace/osgPlugins-whatever then using
> dlopen("osgdb_gif", .... ) will find that lib. You don't have to
> dlopen("/someplace/osgPlugins-whatever/osgdb_gif", ...).

I'm sorry but you don't seem to have quite grasped how the search is
now meant to be done for the plugins.  You are not meant to place the
osgPlugins-version directory in your path, rather you set the path for
the parent directory (if it isn't already on the standard search
path), and the OSG now picks up the appropriate
osgPlugins-versions-version directory.  This way the OSG can prevent
picking up the wrong version of the plugins for the wrong version of
the OSG.

So far the osgPlugin-version prefix hasn't been inforced, which in
retrospect was a mistake as its allowed users to still get mixed up by
previous settings of paths which they were using to directly find the
plugins.   I believe the right way to do is to enforce the
osgPlugins-version prefix from now onwards.

Your own focus on LD_LIBRARY_PATH and man pages and blogs rather
misses the fact that we are dealing with plugins, not libs picked up
at execution time.  As for security issues with use of env vars, one
can always override the default settings, or statically link your
plugins.

Robert.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to