BUG/MEDIUM: cli: crash when trying to access a worker
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 8 Nov 2018 11:00:14 +0000 (12:00 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Nov 2018 13:48:06 +0000 (14:48 +0100)
commite260e0df443b00d991e430515a6879bb186b3454
tree70b037a01dff15a8fd507397cb73518dd415a773
parentb69f1713af2b7e99c31fc4726c5e1ef0058c9c9c
BUG/MEDIUM: cli: crash when trying to access a worker

When using the CLI proxy of the master and trying to access a worker
with the @ prefix, the worker just crash.

The commit 7216032 ("MEDIUM: mworker: leave when the master die")
reintroduced the old code of the pipe, which was not trying to access
the pointers before. The owner of the FD was modified to a different
value, this is a problem since we call listener_accept() in most cases
now from the mworker_accept_wrapper() and it casts the owner variable to
get the listener.

This patch fix the issue by setting back the previous owner of the FD.
src/haproxy.c