summaryrefslogtreecommitdiff
path: root/bus.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2014-02-27 19:10:40 +0100
committerDaniel Mack <zonque@gmail.com>2014-02-27 19:10:40 +0100
commit2492e340aa039e19f2e937bab3d9ab3c930de8da (patch)
treebdcd3d0131cba51fb3f8eac38bfb1fc16bc35a34 /bus.c
parent9482cfca19f22132e8b4ac7379ac6369300610dc (diff)
downloadkdbus-bus-2492e340aa039e19f2e937bab3d9ab3c930de8da.tar.gz
kdbus-bus-2492e340aa039e19f2e937bab3d9ab3c930de8da.tar.bz2
kdbus-bus-2492e340aa039e19f2e937bab3d9ab3c930de8da.zip
bus: document kdbus_bus_uid_is_privileged()
Diffstat (limited to 'bus.c')
-rw-r--r--bus.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bus.c b/bus.c
index 25dd375705f..cc3f1e49d32 100644
--- a/bus.c
+++ b/bus.c
@@ -28,6 +28,15 @@
#include "names.h"
#include "domain.h"
+/**
+ * kdbus_bus_uid_is_privileged() - check whether the current user is a
+ * priviledged bus user
+ * @bus: The bus to check
+ *
+ * Return: true if the current user has CAP_IPC_OWNER capabilities, or
+ * if it has the same UID as the user that created the bus. Otherwise,
+ * false is returned.
+ */
bool kdbus_bus_uid_is_privileged(const struct kdbus_bus *bus)
{
if (capable(CAP_IPC_OWNER))