sd-bus: socket - only transmit auxillary FDs once (#6603)
authorTom Gundersen <teg@jklm.no>
Wed, 30 Aug 2017 11:09:03 +0000 (13:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 Aug 2017 11:09:03 +0000 (13:09 +0200)
commitf29eef2e9072eac6f6570ff7975680bc9caeda2f
treeb92ddab4af8f382c4ff73b8db63c436265df27a1
parent7817154d5ac1c54b23d0a6a858e00c5cdb00d37d
sd-bus: socket - only transmit auxillary FDs once (#6603)

If a message is too large to fit into the output buffer, it will be
transmitted to the kernel in several chunks. However, the FDs must
only ever be transmitted once or they will bereceived by the remote
end repeatedly.

The D-Bus specification disallows several sets of FDs attached to
one message, however, the reference implementation of D-Bus will
not reject such a message, rather it will reassign the duplicate
FDs to subsequent FD-carrying messages.

This attaches the FD array only to the first byte of the message.
src/libsystemd/sd-bus/bus-socket.c