summaryrefslogtreecommitdiffstats
path: root/runtime/transport/transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/transport/transport.c')
-rw-r--r--runtime/transport/transport.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c
index 9f7a25f2..f5ee2c36 100644
--- a/runtime/transport/transport.c
+++ b/runtime/transport/transport.c
@@ -2,7 +2,7 @@
* transport.c - stp transport functions
*
* Copyright (C) IBM Corporation, 2005
- * Copyright (C) Red Hat Inc, 2005-2008
+ * Copyright (C) Red Hat Inc, 2005-2009
* Copyright (C) Intel Corporation, 2006
*
* This file is part of systemtap, and is free software. You can
@@ -211,8 +211,13 @@ int _stp_transport_init(void)
dbug_trans(1, "transport_init\n");
_stp_init_pid = current->pid;
+#ifdef STAPCONF_TASK_UID
_stp_uid = current->uid;
_stp_gid = current->gid;
+#else
+ _stp_uid = current_uid();
+ _stp_gid = current_gid();
+#endif
#ifdef RELAY_GUEST
/* Guest scripts use relay only for reporting warnings and errors */