Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
}
/* The connection does not accept file descriptors */
- if (!(conn->flags & KDBUS_HELLO_ACCEPT_FD) &&
- (kmsg->fds_count > 0 || kmsg->memfds_count > 0)) {
+ if (!(conn->flags & KDBUS_HELLO_ACCEPT_FD) && kmsg->fds_count > 0) {
ret = -ECOMM;
goto exit_unlock;
}
ASSERT_RETURN(ret == -ECOMM);
ret = send_memfds(conn_src, conn_dummy->id, (int *)&memfd, 1);
- ASSERT_RETURN(ret == -ECOMM);
+ ASSERT_RETURN(ret == 0);
/* Try to broadcast file descriptors. This must fail. */
ret = send_fds(conn_src, KDBUS_DST_ID_BROADCAST, fds, 1);