summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-02 23:31:41 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-02 23:32:34 +0100
commitf9638db8de2f915a5c5f6e4b7292494168eb4141 (patch)
treedc702d023d614ab33875b53a7a6912b731227196 /src/libsystemd-bus
parent8bf9fcf48853021ac713d7675b89143e4e8b1ce5 (diff)
bus: make sure we check for "incompatible" flags negotiated with kernel kdbus
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/bus-kernel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 98fc27cda5..fb852bd730 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -1074,6 +1074,13 @@ int bus_kernel_create_bus(const char *name, char **s) {
return -errno;
}
+ /* The higher 32bit of the flags field are considered
+ * 'incompatible flags'. Refuse them all for now. */
+ if (make->flags > 0xFFFFFFFFULL) {
+ close_nointr_nofail(fd);
+ return -ENOTSUP;
+ }
+
if (s) {
char *p;
@@ -1118,6 +1125,13 @@ int bus_kernel_create_namespace(const char *name, char **s) {
return -errno;
}
+ /* The higher 32bit of the flags field are considered
+ * 'incompatible flags'. Refuse them all for now. */
+ if (make->flags > 0xFFFFFFFFULL) {
+ close_nointr_nofail(fd);
+ return -ENOTSUP;
+ }
+
if (s) {
char *p;