Prevent the addition of UST events to agent channels
[lttng-tools.git] / src / bin / lttng-sessiond / cmd.c
index 38ffbb16340d51f290f5a4a983c0c73a3766aedc..63d91f53d197ecc4b54d19a00dafee24668011f5 100644 (file)
@@ -1673,6 +1673,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.02383 seconds and 4 git commands to generate.