sd_pid_notify_with_fds: fix computing msg_controllen
authorMaciej Wereski <m.wereski@partner.samsung.com>
Tue, 8 Sep 2015 13:36:30 +0000 (15:36 +0200)
committerMaciej Wereski <m.wereski@partner.samsung.com>
Wed, 9 Sep 2015 12:28:43 +0000 (14:28 +0200)
commita5bd3c32abb00ad945282568fd1a97c180b68047
tree79bedcfbdc5643a4b0faa6d304b0dd416ec238d9
parent542a69a284805aaf5b92b0e5da39339967d516e3
sd_pid_notify_with_fds: fix computing msg_controllen

CMSG_SPACE(0) may return value other than 0. This caused sendmsg to fail
with EINVAL, when have_pid or n_fds was 0.
src/libsystemd/sd-daemon/sd-daemon.c