]> git.ipfire.org Git - thirdparty/lldpd.git/commit
priv: ensure we write exactly what will be read
authorVincent Bernat <vincent@bernat.im>
Wed, 18 Mar 2015 14:25:36 +0000 (15:25 +0100)
committerVincent Bernat <vincent@bernat.im>
Wed, 18 Mar 2015 14:25:36 +0000 (15:25 +0100)
commit004b5f944539fc74d49f90625c263109585fb52f
tree65388efabe7d204d22b5c8eeb5a127ad8c0b48d8
parent9475dd4c835e23e87967d9668d8a004933384e5c
priv: ensure we write exactly what will be read

When using SOCK_DGRAM/SOCK_SEQPACKET, it doesn't matter to write a bit
more since it is truncated. However, if we want to switch to
SOCK_STREAM, we must exactly write the right amount of bytes.
src/daemon/priv-linux.c
src/daemon/priv.c