chiark / gitweb /
sd-bus: refuse properties that claim to be both writable and constant at the same...
authorLennart Poettering <lennart@poettering.net>
Wed, 19 Nov 2014 19:52:47 +0000 (20:52 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 19 Nov 2014 23:01:05 +0000 (00:01 +0100)
src/libsystemd/sd-bus/bus-objects.c

index 0ab1119b583d679da2588e039903dce0c2c01bab..7981d65052852fca0ed4a78750076f7dd20180b1 100644 (file)
@@ -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: {