Fix: channel names are not validated
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 27 Nov 2014 22:35:32 +0000 (17:35 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 1 Dec 2014 23:36:55 +0000 (18:36 -0500)
commita407f9967766c6e3108a0bdf779d2d2124fd576f
tree71f6f347f604d320bf3c59c14c34734601526241
parent9863d1c8aeabeb4d3b6532ed0eacc76a4c5f3912
Fix: channel names are not validated

This patch ensures:

  1. A channel name does not contain any '/' character, since
     relative paths may be injected in the channel name
     otherwise (knowing that the channel name is eventually
     part of a file name)
  2. A channel name does not start with a '.' character, since
     trace readers (Babeltrace is one of them) could interpret
     files starting with a dot as hidden files and ignore
     them when opening the CTF trace

Fixes: #751
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
include/lttng/lttng-error.h
src/bin/lttng-sessiond/cmd.c
src/bin/lttng/commands/enable_channels.c
src/common/error.c
This page took 0.097127 seconds and 4 git commands to generate.