kdbus: check policy first, only then open kdbus 50/178150/4
authorAleksy Barcz <a.barcz@partner.samsung.com>
Tue, 8 May 2018 09:21:10 +0000 (11:21 +0200)
committerAdrian Szyndela <adrian.s@samsung.com>
Tue, 5 Jun 2018 07:37:52 +0000 (09:37 +0200)
commit9eec62592ff6b443bce5f3bd8dd3b67441691e5b
tree515b266f6e90792a2e2e9a94123479cdb2888b34
parent6b199fd8a3a01bf0246411dfc43955ee2108c61c
kdbus: check policy first, only then open kdbus

A process shouldn't hold an open kdbus descriptor, if according to
security policy this process has no rights to open the bus at all.
Corrected error message and code to be consistent with dbus-daemon.

Change-Id: I8c138438a21736f9241addc9ed5a616f6be19442
dbus/dbus-transport-kdbus.c