diff options
author | Josh Stone <jistone@redhat.com> | 2009-04-01 19:41:55 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-04-01 19:41:55 -0700 |
commit | 65ffc3f32328473cb74aa5c7eca7e46bb82bd7fb (patch) | |
tree | 837cf08f146cf5230b9b8f84081efb4e6d0557ae /run-staprun.in | |
parent | 5717eaeb49421506ed323f8473790aaf74389237 (diff) | |
download | systemtap-steved-65ffc3f32328473cb74aa5c7eca7e46bb82bd7fb.tar.gz systemtap-steved-65ffc3f32328473cb74aa5c7eca7e46bb82bd7fb.tar.xz systemtap-steved-65ffc3f32328473cb74aa5c7eca7e46bb82bd7fb.zip |
Fix the magic run-stap wrappers even more
Diffstat (limited to 'run-staprun.in')
-rw-r--r-- | run-staprun.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/run-staprun.in b/run-staprun.in new file mode 100644 index 00000000..0b5f795b --- /dev/null +++ b/run-staprun.in @@ -0,0 +1,13 @@ +#!@PERL@ -w + +# Reset real IDs to those we had before we were sudo-invoked. +# This gives staprun the IDs it expects from a setuid exec. +$< = $ENV{'SUDO_UID'}; +$( = $ENV{'SUDO_GID'}; + +$ENV{'SYSTEMTAP_STAPRUN'} = "sudo '$ENV{'builddir'}/staprun'"; +$ENV{'SYSTEMTAP_STAPIO'} = "$ENV{'builddir'}/stapio"; + +exec { "$ENV{'builddir'}/staprun" } ('staprun', @ARGV); + +exit; |