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, 21 Jan 2019 18:39:24 +0000 (13:39 -0500)
commit5bedd9864596458ab996a11092d29484c4e283ab
tree187786a5c54ded6cc8d3b1869f27208d80dc3607
parent129ee92209181e81864077422fa35edd374becf5
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.025453 seconds and 4 git commands to generate.