[lttng-dev] [PATCH lttng-tools 4/4] RFC: Add userspace uid/gid contexts
Michael Jeanson
mjeanson at efficios.com
Tue Mar 6 15:53:52 EST 2018
Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
src/bin/lttng-sessiond/save.c | 18 ++++++++++++++++++
src/bin/lttng-sessiond/trace-ust.c | 18 ++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c
index 9550774..6fcd902 100644
--- a/src/bin/lttng-sessiond/save.c
+++ b/src/bin/lttng-sessiond/save.c
@@ -395,6 +395,24 @@ const char *get_ust_context_type_string(
case LTTNG_UST_CONTEXT_UTS_NS:
context_type_string = config_event_context_uts_ns;
break;
+ case LTTNG_UST_CONTEXT_VUID:
+ context_type_string = config_event_context_vuid;
+ break;
+ case LTTNG_UST_CONTEXT_VEUID:
+ context_type_string = config_event_context_veuid;
+ break;
+ case LTTNG_UST_CONTEXT_VSUID:
+ context_type_string = config_event_context_vsuid;
+ break;
+ case LTTNG_UST_CONTEXT_VGID:
+ context_type_string = config_event_context_vgid;
+ break;
+ case LTTNG_UST_CONTEXT_VEGID:
+ context_type_string = config_event_context_vegid;
+ break;
+ case LTTNG_UST_CONTEXT_VSGID:
+ context_type_string = config_event_context_vsgid;
+ break;
case LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER:
/*
* Error, should not be stored in the XML, perf contexts
diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c
index 33aec26..4ec2954 100644
--- a/src/bin/lttng-sessiond/trace-ust.c
+++ b/src/bin/lttng-sessiond/trace-ust.c
@@ -576,6 +576,24 @@ int trace_ust_context_type_event_to_ust(
case LTTNG_EVENT_CONTEXT_UTS_NS:
utype = LTTNG_UST_CONTEXT_UTS_NS;
break;
+ case LTTNG_EVENT_CONTEXT_VUID:
+ utype = LTTNG_UST_CONTEXT_VUID;
+ break;
+ case LTTNG_EVENT_CONTEXT_VEUID:
+ utype = LTTNG_UST_CONTEXT_VEUID;
+ break;
+ case LTTNG_EVENT_CONTEXT_VSUID:
+ utype = LTTNG_UST_CONTEXT_VSUID;
+ break;
+ case LTTNG_EVENT_CONTEXT_VGID:
+ utype = LTTNG_UST_CONTEXT_VGID;
+ break;
+ case LTTNG_EVENT_CONTEXT_VEGID:
+ utype = LTTNG_UST_CONTEXT_VEGID;
+ break;
+ case LTTNG_EVENT_CONTEXT_VSGID:
+ utype = LTTNG_UST_CONTEXT_VSGID;
+ break;
default:
utype = -1;
break;
--
2.7.4
More information about the lttng-dev
mailing list