No point of trying to init kernel tracer if the session daemon is not
root. At this time, only UID=0 can load kernel modules and interact with
the lttng kernel tracer.
Reported-by: Daniel Thibault <daniel.thibault@drdc-rddc.gc.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
*/
switch (cmd_ctx->lsm->domain.type) {
case LTTNG_DOMAIN_KERNEL:
+ if (!is_root) {
+ ret = LTTCOMM_KERN_NA;
+ goto error;
+ }
+
/* Kernel tracer check */
if (kernel_tracer_fd == 0) {
/* Basically, load kernel tracer modules */