summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2008-09-18 16:23:12 -0500
committerDavid Smith <dsmith@redhat.com>2008-09-18 16:23:12 -0500
commit0387bde4d7cb9853a93af0d266330dea7938b506 (patch)
tree6b1d2b3383712c28aab79f7fca49c1e5e74bae3e /runtime
parent7ef27e8ab9c7921350fd32af5c4b4d86205ca34b (diff)
downloadsystemtap-steved-0387bde4d7cb9853a93af0d266330dea7938b506.tar.gz
systemtap-steved-0387bde4d7cb9853a93af0d266330dea7938b506.tar.xz
systemtap-steved-0387bde4d7cb9853a93af0d266330dea7938b506.zip
Fix PR 6903 by checking for the real uid, not the euid.
2008-09-18 David Smith <dsmith@redhat.com> PR 6903. * staprun_funcs.c (check_permissions): Instead of checking the effective uid, check the real uid for root permissions.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/staprun/ChangeLog6
-rw-r--r--runtime/staprun/staprun_funcs.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog
index 21e02e47..c6d75106 100644
--- a/runtime/staprun/ChangeLog
+++ b/runtime/staprun/ChangeLog
@@ -1,3 +1,9 @@
+2008-09-18 David Smith <dsmith@redhat.com>
+
+ PR 6903.
+ * staprun_funcs.c (check_permissions): Instead of checking the
+ effective uid, check the real uid for root permissions.
+
2008-09-06 Frank Ch. Eigler <fche@elastic.org>
* mainloop.c (start_cmd): Rewrite to use wordexp/execvp/ptrace.
diff --git a/runtime/staprun/staprun_funcs.c b/runtime/staprun/staprun_funcs.c
index 8fa95e45..5e7fa102 100644
--- a/runtime/staprun/staprun_funcs.c
+++ b/runtime/staprun/staprun_funcs.c
@@ -307,7 +307,7 @@ int check_permissions(void)
int path_check = 0;
/* If we're root, we can do anything. */
- if (geteuid() == 0)
+ if (getuid() == 0)
return 1;
/* Lookup the gid for group "stapdev" */