diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-01-06 19:32:24 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-01-06 19:32:24 -0500 |
commit | 406d830652cc659fe420dcf5b54398ea22310750 (patch) | |
tree | a390485d59c124025ccae2895f247dc0ece8babd /tapset/context.stp | |
parent | ec77429d7f3b6e5bc6bb8a93beb8dac6c6dd99b1 (diff) | |
download | systemtap-steved-406d830652cc659fe420dcf5b54398ea22310750.tar.gz systemtap-steved-406d830652cc659fe420dcf5b54398ea22310750.tar.xz systemtap-steved-406d830652cc659fe420dcf5b54398ea22310750.zip |
PR9699: tapset changes for STAPCONF_TASK_UID for *uid()/*gid() calls
Diffstat (limited to 'tapset/context.stp')
-rw-r--r-- | tapset/context.stp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tapset/context.stp b/tapset/context.stp index c737edd0..7fd961c8 100644 --- a/tapset/context.stp +++ b/tapset/context.stp @@ -1,5 +1,5 @@ // context tapset -// Copyright (C) 2005, 2006, 2007 Red Hat Inc. +// Copyright (C) 2005-2009 Red Hat Inc. // Copyright (C) 2006 Intel Corporation. // // This file is part of systemtap, and is free software. You can @@ -76,7 +76,11 @@ function pexecname:string () %{ /* pure */ * Return the gid of the current process. */ function gid:long () %{ /* pure */ +#ifdef STAPCONF_TASK_UID THIS->__retvalue = current->gid; +#else + THIS->__retvalue = current_gid(); +#endif %} /** @@ -85,7 +89,11 @@ function gid:long () %{ /* pure */ * Return the effective gid of the current process. */ function egid:long () %{ /* pure */ +#ifdef STAPCONF_TASK_UID THIS->__retvalue = current->egid; +#else + THIS->__retvalue = current_egid(); +#endif %} /** @@ -94,7 +102,11 @@ function egid:long () %{ /* pure */ * Return the uid of the current process. */ function uid:long () %{ /* pure */ +#ifdef STAPCONF_TASK_UID THIS->__retvalue = current->uid; +#else + THIS->__retvalue = current_uid(); +#endif %} /** @@ -103,7 +115,11 @@ function uid:long () %{ /* pure */ * Return the effective uid of the current process. */ function euid:long () %{ /* pure */ +#ifdef STAPCONF_TASK_UID THIS->__retvalue = current->euid; +#else + THIS->__retvalue = current_euid(); +#endif %} // cpuid() is not documented |