summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-19 20:52:47 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-20 00:01:05 +0100
commit9b772efb41c2d9f743ba5e96804bdf89b12630d8 (patch)
tree06061c3dec0ad41c32705be1e5296a415eab336c
parent4c3f1641f13b7687a0dc234d3ae387b7c40494ff (diff)
sd-bus: refuse properties that claim to be both writable and constant at the same time
-rw-r--r--src/libsystemd/sd-bus/bus-objects.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c
index 0ab1119b58..7981d65052 100644
--- a/src/libsystemd/sd-bus/bus-objects.c
+++ b/src/libsystemd/sd-bus/bus-objects.c
@@ -1682,6 +1682,11 @@ static int add_object_vtable_internal(
goto fail;
}
+ if (v->flags & SD_BUS_VTABLE_PROPERTY_CONST) {
+ r = -EINVAL;
+ goto fail;
+ }
+
/* Fall through */
case _SD_BUS_VTABLE_PROPERTY: {