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 18:49:57 +0000 (14:49 -0400)
commit0f7e462855a941e18907f1a33060368a3c5e1f16
tree39f4a5047d75c6ed7e8a5e2c6475572c38d6fda3
parentf16ab844d8b68af6e751a7507e890d8778d222a6
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.025427 seconds and 4 git commands to generate.