problem with running a direct command
Josh Stone
jistone@redhat.com
Tue May 14 16:52:00 GMT 2013
On 05/14/2013 05:57 AM, corpaul wrote:
> Does Systemtap make a change in the LD_LIBRARY_PATH or something?
Yes, this is a consequence of going through our staprun loader, which is
a setuid executable. LD_LIBRARY_PATH, LD_PRELOAD, and several others
are removed and ignored from all setuid/setgid executables for security
reasons.
We could possibly backup these variables somehow, and restore them after
we've dropped privileges, but I'm always hesitant to mess with
security-sensitive code.
Since you're already using a script, tribler.sh, can you set the
relevant environment in there? Or another option is to set this in the
command invocation, like:
stap .... -c "env 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH' ./tribler.sh"
Note the double-quotes to let it expand early, and single-quotes to
preserve any spacing when it runs.
More information about the Systemtap
mailing list