From: Daniel Mack Date: Wed, 22 Oct 2014 12:05:39 +0000 (+0200) Subject: message: allow memfds for broadcast messages X-Git-Tag: upstream/0.20141102.012929utc~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=559d061d5853b63656d71e63d3f491ae9679d8ed;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git message: allow memfds for broadcast messages As discussed on LPC. Signed-off-by: Daniel Mack --- diff --git a/message.c b/message.c index 65c3a26..1c5f1b0 100644 --- a/message.c +++ b/message.c @@ -128,15 +128,9 @@ static int kdbus_msg_scan_items(struct kdbus_conn *conn, bool has_fds = false; struct file *f; - KDBUS_ITEMS_FOREACH(item, msg->items, KDBUS_ITEMS_SIZE(msg, items)) { - if (item->type == KDBUS_ITEM_PAYLOAD_MEMFD) { - /* do not allow to broadcast file descriptors */ - if (msg->dst_id == KDBUS_DST_ID_BROADCAST) - return -ENOTUNIQ; - + KDBUS_ITEMS_FOREACH(item, msg->items, KDBUS_ITEMS_SIZE(msg, items)) + if (item->type == KDBUS_ITEM_PAYLOAD_MEMFD) kmsg->memfds_count++; - } - } if (kmsg->memfds_count > 0) { kmsg->memfds = kcalloc(kmsg->memfds_count,