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:54:52 +0000 (18:54 -0500)
commit38956b501df0cc3f5041c5604039c2ec2d8efa76
tree1591cb23e734048d27d346d17f2f2aaff8b5c5ea
parente93eda1e1e17178cfecf53265a12867c8b1f1978
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>
Conflicts:
include/lttng/lttng-error.h
src/bin/lttng/commands/enable_channels.c
src/common/error.c
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.02562 seconds and 4 git commands to generate.