summaryrefslogtreecommitdiff
path: root/src/import/importd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/importd.c')
-rw-r--r--src/import/importd.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/import/importd.c b/src/import/importd.c
index 2eef476015..eaf04e6a2b 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -518,12 +518,10 @@ static int manager_on_notify(sd_event_source *s, int fd, uint32_t revents, void
return -errno;
}
+ cmsg_close_all(&msghdr);
+
for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) {
- if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
- close_many((int*) CMSG_DATA(cmsg), (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int));
- log_warning("Somebody sent us unexpected fds, ignoring.");
- return 0;
- } else if (cmsg->cmsg_level == SOL_SOCKET &&
+ if (cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_CREDENTIALS &&
cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) {