From 9b772efb41c2d9f743ba5e96804bdf89b12630d8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 19 Nov 2014 20:52:47 +0100 Subject: sd-bus: refuse properties that claim to be both writable and constant at the same time --- src/libsystemd/sd-bus/bus-objects.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/libsystemd') 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: { -- cgit v1.2.3-54-g00ecf