Zach Welch wrote:
> On Wed, 2009-07-08 at 12:47 +0200, Øyvind Harboe wrote:
>   
>> How is the attached patch?
>>     
>
> The NEWS file details the migration of the installed scripts from
> $(pkglibdir) to $(pkgdatadir)/scripts; the former should not be used
> anymore, and custom scripts migrated into $(pkgdatadir)/site/.  This
> patch will prevent us from forcing this migration, as the old location
> will continue to be be used.  So it might fix the bug, but it seems bad.
>
> However, this particular example shows how our searching for files may
> be insufficient.  Presently, there is no way to enforce a separation
> between script files and executable files (if such is desired).
> The effect of this would be to allow a site to install read-only binary
> files that may be used by read-write scripts.  In reality, I think ACLs
> make this proposition more meaningful, but others can comment on the
> concept of privilege separation.  Am I taking that idea too far here?
>   
I do not see *that* as a problem, but I think binaries like the debug
handler (or other modules/plugins/...) that are a fixed component of the
installed OpenOCD version should only be loaded from $(pkglibdir): there
is no use in looking for them in the user's scripts directory, and if a
file with the right name but wrong contents is found there, it will even
disturb operation.

> In this light, I would rather see us add a mechanism to find the two
> types of file, such that the search paths for each are separated. 
> Script files can be searched using one list of paths, and binary files
> from another.  Internally, it seems like we could switch search paths
> based on the filename extension being loaded.  
>   
Agreed, although I think the code that is looking for a file should
specify the type of file, instead of relying on the extension.

cu
Michael


_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to