trigger: expose trigger owner uid
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 18 Sep 2020 20:37:50 +0000 (16:37 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 9 Nov 2020 19:59:43 +0000 (14:59 -0500)
commit64eafdf60552bbd7e22fb1c8fc8fc2b42a3cf68b
tree0bc2f04da9eb9007799c9e484d636ee26abd3e75
parent0db0f8e075e3790a2707736d2a4d086b123f3160
trigger: expose trigger owner uid

To facilitate behavior management for the root user and to allow
duplicate trigger names across users, enforce the usage of the trigger
owner user id.

The root user will be able to register and unregister triggers on behalf
of other users. The root user will also have visibility on triggers of
other users.

Only the root user can use the `lttng_trigger_set_owner_uid` function
successfully. As indicated in the comments, this function performs
a client-side validation steps to catch mis-uses, but this is
properly enforced on the sessiond's end in the register/unregister
trigger commands.

With the future addition of a trigger name (id), the owner id and the
name will act as a key tuple allowing identicaly named triggers across
users.

We plan on exposing the `--user` switch in the upcoming command line
(add-trigger, remove-trigger).

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ifca3c41b7ffd97b67e16fb80c18472b667cb2f56
include/lttng/trigger/trigger-internal.h
include/lttng/trigger/trigger.h
src/bin/lttng-sessiond/action-executor.c
src/bin/lttng-sessiond/cmd.c
src/common/trigger.c
src/lib/lttng-ctl/lttng-ctl.c
This page took 0.025889 seconds and 4 git commands to generate.