Bug #751
closedChannel names ought to be filtered just like session names
100%
Description
Channel names obey the same limit (NAME_MAX
) as session names, and since they have pretty much the same role storage-path-wise, they ought to be checked in the same way.
Right now, the only character one cannot include in a channel name is the comma, because the enable-channel
command treats it as a channel name separator. Channel names may include spaces, but these need to be escaped in some contexts (e.g. 'lttng disable-channel -k my\ kernel\ channel').
However, it is perfectly legal to create a name like this:
$ lttng enable-channel -k k/../ust/weird
This does not in fact create a misplaced kernel channel file: it creates no file at all, and no warning or error occurs. I haven't checked what happens if that channel is sent to a remote relay daemon, but that would undoubtedly be just as troublesome.