From: Djalal Harouni Date: Tue, 28 Oct 2014 09:44:21 +0000 (+0100) Subject: connection: improve the connection do not accept fd passing check X-Git-Tag: upstream/0.20141102.012929utc~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d7d9fada2cecbb0a5911c05bab2fbaadc25272c;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git connection: improve the connection do not accept fd passing check Signed-off-by: Djalal Harouni --- diff --git a/connection.c b/connection.c index 898db9c..cca14a4 100644 --- a/connection.c +++ b/connection.c @@ -470,8 +470,9 @@ static int kdbus_conn_entry_insert(struct kdbus_conn *conn, goto exit_unlock; } - if ((kmsg->fds && !(conn->flags & KDBUS_HELLO_ACCEPT_FD)) || - (kmsg->memfds_count && !(conn->flags & KDBUS_HELLO_ACCEPT_FD))) { + /* The connection does not accept file descriptors */ + if (!(conn->flags & KDBUS_HELLO_ACCEPT_FD) && + (kmsg->fds_count > 0 || kmsg->memfds_count > 0)) { ret = -ECOMM; goto exit_unlock; }