From: Djalal Harouni Date: Tue, 28 Oct 2014 12:07:50 +0000 (+0100) Subject: connection: block only normal fds allwo sending memfds X-Git-Tag: upstream/0.20141102.012929utc~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9eca0f3a345aa40df3ce30a137d7dc2ac6b89f47;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git connection: block only normal fds allwo sending memfds Signed-off-by: Djalal Harouni --- diff --git a/connection.c b/connection.c index da6be4e..5b1f3ed 100644 --- a/connection.c +++ b/connection.c @@ -492,8 +492,7 @@ static int kdbus_conn_entry_insert(struct kdbus_conn *conn, } /* 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; } diff --git a/test/test-fd.c b/test/test-fd.c index 98d0f2c..7e59ff8 100644 --- a/test/test-fd.c +++ b/test/test-fd.c @@ -387,7 +387,7 @@ int kdbus_test_fd_passing(struct kdbus_test_env *env) 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);