diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-01 19:25:30 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-07-01 19:30:24 +0200 |
commit | 077fc5e2602effd9b0f46d8ae95271de2b5f2997 (patch) | |
tree | e732b8d59c0f10773ef7eb1852d92dd482b5cd1b /src/compat-libs | |
parent | 0204c4bd69f694b527643ace9d434befce80085c (diff) |
udev: destroy manager before cleaning environment
Due to our _cleanup_ usage for the udev manager, it will be destroyed
after the "exit:" label has finished. Therefore, it is the last
destruction done in main(). This has two side-effects:
- mac_selinux is destroyed before the udev manager is, possible causing
use-after-free if the manager-cleanup accesses selinux data
- log_close() is called *before* the manager is destroyed, possibly
re-opening the log if you use --debug (and thus not re-applying the
--debug option)
Avoid this by moving the manager-handling into a new function called
run(). This function will be left before we enter the "exit:" label in
main(), hence, the manager object will be destroyed early.
Diffstat (limited to 'src/compat-libs')
0 files changed, 0 insertions, 0 deletions