summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2016-06-10 09:50:16 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-06-18 17:24:23 -0400
commit222953e87f34545a3f9c6d3c18216e222bf6ea94 (patch)
tree529adf6bffb7fb2a8cd9b91e5ab3b19bb6270510 /src/shared
parent6564ab0512320e6a2381722054d1f281397227d5 (diff)
Ensure kdbus isn't used (#3501)
Delete the dbus1 generator and some critical wiring. This prevents kdbus from being loaded or detected. As such, it will never be used, even if the user still has a useful kdbus module loaded on their system. Sort of fixes #3480. Not really, but it's better than the current state.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/bus-util.c34
-rw-r--r--src/shared/bus-util.h3
2 files changed, 0 insertions, 37 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index 8cfa936347..8e3307dc24 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -1505,40 +1505,6 @@ int bus_path_decode_unique(const char *path, const char *prefix, char **ret_send
return 1;
}
-bool is_kdbus_wanted(void) {
- _cleanup_free_ char *value = NULL;
-#ifdef ENABLE_KDBUS
- const bool configured = true;
-#else
- const bool configured = false;
-#endif
-
- int r;
-
- if (get_proc_cmdline_key("kdbus", NULL) > 0)
- return true;
-
- r = get_proc_cmdline_key("kdbus=", &value);
- if (r <= 0)
- return configured;
-
- return parse_boolean(value) == 1;
-}
-
-bool is_kdbus_available(void) {
- _cleanup_close_ int fd = -1;
- struct kdbus_cmd cmd = { .size = sizeof(cmd), .flags = KDBUS_FLAG_NEGOTIATE };
-
- if (!is_kdbus_wanted())
- return false;
-
- fd = open("/sys/fs/kdbus/control", O_RDWR | O_CLOEXEC | O_NONBLOCK | O_NOCTTY);
- if (fd < 0)
- return false;
-
- return ioctl(fd, KDBUS_CMD_BUS_MAKE, &cmd) >= 0;
-}
-
int bus_property_get_rlimit(
sd_bus *bus,
const char *path,
diff --git a/src/shared/bus-util.h b/src/shared/bus-util.h
index d792258ecd..db6b1acba2 100644
--- a/src/shared/bus-util.h
+++ b/src/shared/bus-util.h
@@ -157,7 +157,4 @@ int bus_log_create_error(int r);
int bus_path_encode_unique(sd_bus *b, const char *prefix, const char *sender_id, const char *external_id, char **ret_path);
int bus_path_decode_unique(const char *path, const char *prefix, char **ret_sender, char **ret_external);
-bool is_kdbus_wanted(void);
-bool is_kdbus_available(void);
-
int bus_property_get_rlimit(sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *error);