Tracker: Patches

5 Allow AppDirs to set environment variables - ID: 962231
Last Update: Comment added ( tal197 )

The patch adds support for a new tag in AppInfo.xml:
<AppDirVar>. If present it should contain the name of a
variable which will be set to the path of the AppDir.

This variable will be set within the filer so that any
subprocess of the filer can access it.

The variable will, currently, only be set on running
the AppDir but a one line addition in
diritem.c->examine_dir() can enable it for the var to
be set on just looking at an AppDir. In this case, the
"overwrite" parameter to filer_boot() would be set to 0.

This will mostly be of use to AppDirs containing
modules for use by other programs, or include files etc.


Andrew Flegg ( aflegg ) - 2004-05-28 14:09

5

Closed

Rejected

Nobody/Anonymous

None

None

Public


Comment ( 1 )

Date: 2004-05-28 15:10
Sender: tal197Project AdminAccepting Donations

Logged In: YES
user_id=40461

Setting on view is really insecure (even if you block
obvious variables like PATH and LD_PRELOAD, etc). Setting an
environment variable on run will lead to inconsistancies
(programs launched from the filer see one variable, programs
launched from ROX-Menu see another, etc).

To get the set-on-run behaviour, store the setting in
CHOICESPATH instead (or XDG_CONFIG_HOME). Get applications
to read that, then the setting will persist over reboots and
be seen the same from all applications.

If you want to find shared resources without needing to run
the app, see Zero Install (0install.net) for a secure way to
do this. Or, use a package manager and set the default
configuration on install.

You can combine the methods to get secure defaults and
customisability.



Comments have been closed for this artifact.

Attached File ( 1 )

Filename Description Download
rox-filer_boot.patch Provide filer_boot() in filer API Download

Changes ( 4 )

Field Old Value Date By
resolution_id None 2004-05-28 15:10 tal197
close_date - 2004-05-28 15:10 tal197
status_id Open 2004-05-28 15:10 tal197
File Added 88757: rox-filer_boot.patch 2004-05-28 14:09 aflegg