This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: problem with running a direct command


Works excellent, thanks!

--CP
________________________________________
From: Josh Stone [jistone@redhat.com]
Sent: Tuesday, May 14, 2013 6:52 PM
To: Cor-paul Bezemer - EWI
Cc: systemtap@sourceware.org
Subject: Re: problem with running a direct command

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]