Prevent the addition of UST events to agent channels
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index e1fbf769cbfb2833ecd98dc6b2f168e98f71dd4b..f8fa4dedddda209c3280b05e71f105d45a79a66d 100644 (file)
@@ -1687,6 +1687,16 @@ static int _cmd_enable_event(struct ltt_session *session,
                        assert(uchan);
                }
 
+               if (uchan->domain != LTTNG_DOMAIN_UST && !internal_event) {
+                       /*
+                        * Don't allow users to add UST events to channels which
+                        * are assigned to a userspace subdomain (JUL, Log4J,
+                        * Python, etc.).
+                        */
+                       ret = LTTNG_ERR_INVALID_CHANNEL_DOMAIN;
+                       goto error;
+               }
+
                if (!internal_event) {
                        /*
                         * Ensure the event name is not reserved for internal
This page took 0.023226 seconds and 4 git commands to generate.