30 lines
980 B
Diff
30 lines
980 B
Diff
|
From 9b772efb41c2d9f743ba5e96804bdf89b12630d8 Mon Sep 17 00:00:00 2001
|
||
|
From: Lennart Poettering <lennart@poettering.net>
|
||
|
Date: Wed, 19 Nov 2014 20:52:47 +0100
|
||
|
Subject: [PATCH] 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(+)
|
||
|
|
||
|
diff --git src/libsystemd/sd-bus/bus-objects.c src/libsystemd/sd-bus/bus-objects.c
|
||
|
index 0ab1119..7981d65 100644
|
||
|
--- src/libsystemd/sd-bus/bus-objects.c
|
||
|
+++ 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: {
|
||
|
--
|
||
|
1.7.9.2
|
||
|
|