From: Michael Jeanson Date: Tue, 12 Feb 2019 16:51:55 +0000 (-0500) Subject: Add UST uid/gid contexts X-Git-Tag: v2.12.0-rc1~285 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4fc59cb88dd740e9b0d48c533393580229ceef66;p=lttng-tools.git Add UST uid/gid contexts Add the following userspace tracer context fields: - vuid Virtual real user ID: real user ID as seen from the point of view of the current user namespace - veuid Virtual effective user ID: effective user ID as seen from the point of view of the current user namespace - vsuid Virtual saved set-user ID: saved set-user ID as seen from the point of view of the current user namespace - vgid Virtual real group ID: real group ID as seen from the point of view of the current user namespace - vegid Virtual effective group ID: effective group ID as seen from the point of view of the current user namespace - vsgid Virtual saved set-group ID: saved set-group ID as seen from the point of view of the current user namespace Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index cb8a6b060..865775c8d 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -404,6 +404,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 e91102a6d..486b53d30 100644 --- a/src/bin/lttng-sessiond/trace-ust.c +++ b/src/bin/lttng-sessiond/trace-ust.c @@ -585,6 +585,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;