summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2011-01-07 15:28:08 -0500
committerSteve Dickson <steved@redhat.com>2011-01-07 15:28:08 -0500
commitd13bc40cb3ee1904866e4e0c660162706e5f4d2b (patch)
tree4526beadc4d369014df008a05fcfcb1b4e353d59 /tapset
parent3d039e6f9ad896fe43438aa3d1d0d37e06712833 (diff)
downloadsystemtap-d13bc40cb3ee1904866e4e0c660162706e5f4d2b.tar.gz
systemtap-d13bc40cb3ee1904866e4e0c660162706e5f4d2b.tar.xz
systemtap-d13bc40cb3ee1904866e4e0c660162706e5f4d2b.zip
Add code for debugging nfs_access with secure mounts
Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'tapset')
-rw-r--r--tapset/rpc_cred.stp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tapset/rpc_cred.stp b/tapset/rpc_cred.stp
new file mode 100644
index 0000000..441a0bf
--- /dev/null
+++ b/tapset/rpc_cred.stp
@@ -0,0 +1,14 @@
+%{
+#include <linux/kernel.h>
+#include <linux/fs.h>
+#include <linux/sunrpc/clnt.h>
+%}
+
+function rpc_cred_uid:string(_cred:long)
+%{
+ struct rpc_cred *cred = (struct rpc_cred *)(long) kread(&(THIS->_cred));
+
+ snprintf(THIS->__retvalue, MAXSTRINGLEN, "uid=%d", cred->cr_uid);
+
+ CATCH_DEREF_FAULT();
+%}