Fix: lttng-ctl: unvalidated session destruction handle API arguments
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 2 Oct 2019 18:46:26 +0000 (14:46 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 2 Oct 2019 23:32:12 +0000 (19:32 -0400)
commite823731f81306f658a35695389414fdbfcd7fb45
tree0fa43ca7eb3a3c21f531fc6354ce287505e2e947
parent77d772ea7f0b16ca5f4cae1839bf474f000d6d69
Fix: lttng-ctl: unvalidated session destruction handle API arguments

The liblttng-ctl API is not performance sensitive and normally adopts
a defensive stance with regards to supplied arguments. The session
destruction handle API introduced in 2.11 does not check user-supplied
arguments for NULLs which does not fit with existing liblttng-ctl API
conventions.

Add NULL checks for all arguments which cannot be legitimately left
NULL and return a suitable "invalid parameters" return code.

Moreover, note that lttng_destroy_session_ext() is now used by
lttng_destroy_session(), which previously checked for a NULL session
name. Not checking for this case in the new 'ext' version introduced a
change in behaviour.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/lib/lttng-ctl/destruction-handle.c
This page took 0.025601 seconds and 4 git commands to generate.