[lttng-dev] [PATCH LTTNG-UST] Add LTTNG_HOME_RUNDIR constant for local tracing

David Goulet david.goulet at polymtl.ca
Thu Dec 8 15:41:46 EST 2011


Adds the LTTNG_HOME_RUNDIR constant using ".lttng" as local directory
used for local sockets (when the session daemon is not running under
root privileges).

This is part of a change made to lttng-tools in order to support
unprivileged users to use the UST tracer.

Signed-off-by: David Goulet <david.goulet at polymtl.ca>
---
 include/ust-comm.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/ust-comm.h b/include/ust-comm.h
index 4c360dc..7d0b629 100644
--- a/include/ust-comm.h
+++ b/include/ust-comm.h
@@ -39,12 +39,13 @@
 #define LTTNG_UST_DEFAULT_CONSTRUCTOR_TIMEOUT_MS	3000
 
 #define LTTNG_RUNDIR                        "/var/run/lttng"
+#define LTTNG_HOME_RUNDIR                   "%s/.lttng"
 
 /* Default unix socket path */
 #define DEFAULT_GLOBAL_CLIENT_UNIX_SOCK     LTTNG_RUNDIR "/client-lttng-sessiond"
 #define DEFAULT_GLOBAL_APPS_UNIX_SOCK       LTTNG_RUNDIR "/apps-lttng-sessiond"
-#define DEFAULT_HOME_APPS_UNIX_SOCK         "%s/.apps-lttng-sessiond"
-#define DEFAULT_HOME_CLIENT_UNIX_SOCK       "%s/.client-lttng-sessiond"
+#define DEFAULT_HOME_APPS_UNIX_SOCK         LTTNG_HOME_RUNDIR "/apps-lttng-sessiond"
+#define DEFAULT_HOME_CLIENT_UNIX_SOCK       LTTNG_HOME_RUNDIR "/client-lttng-sessiond"
 
 #define DEFAULT_GLOBAL_APPS_WAIT_SHM_PATH   "/lttng-ust-apps-wait"
 #define DEFAULT_HOME_APPS_WAIT_SHM_PATH     "/lttng-ust-apps-wait-%u"
-- 
1.7.8




More information about the lttng-dev mailing list