summaryrefslogtreecommitdiffstats
path: root/run-stapio.in
diff options
context:
space:
mode:
Diffstat (limited to 'run-stapio.in')
-rw-r--r--run-stapio.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/run-stapio.in b/run-stapio.in
new file mode 100644
index 00000000..554c2d33
--- /dev/null
+++ b/run-stapio.in
@@ -0,0 +1,10 @@
+#!@PERL@ -w
+
+# Reset real IDs to those we had before running sudo in run-staprun.sh.
+# This gives stapio the IDs it expects from a setuid exec.
+$< = $ENV{'SUDO_UID'};
+$( = $ENV{'SUDO_GID'};
+
+exec { "$ENV{'builddir'}/stapio" } ('stapio', @ARGV);
+
+exit;