Fix: leak of sessiond configuration on launch of run-as worker
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 11 Jan 2019 20:49:44 +0000 (15:49 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 14 Jan 2019 22:56:28 +0000 (17:56 -0500)
commit929f71ec24b58045319473f050a7f235f726ec78
tree6c0f2150c79522dc877b653e02697e2ebe9f027b
parent16ffecdb7f39efbac8b3866a976ac4e13ad09ff5
Fix: leak of sessiond configuration on launch of run-as worker

The run-as worker is spawned through fork() without using
exec*(). This means that any resource allocated by the session
daemon before the launch of the run-as worker will be leaked in
the run-as worker's process.

A callback is added to the run_as launch interface to allow users
a chance to clean-up after the fork occurs. This mechanism is
fragile as it may not always be easy (or possible) to track all
such resources in the future. This makes a strong argument for using a
new process image (through exec*()) and forego any such problem at
some point.

The lttng-consumerd from a similar (and more severe) problem with its
own run-as worker. A fix adressing the consumerd's problem follows.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-consumerd/lttng-consumerd.c
src/bin/lttng-sessiond/main.c
src/common/runas.c
src/common/runas.h
This page took 0.026556 seconds and 5 git commands to generate.