summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2015-06-03 22:24:16 +0200
committerKay Sievers <kay@vrfy.org>2015-06-03 22:24:16 +0200
commit6517217d49e59938611b6c00965f44d46a255a1d (patch)
treeab7f4977400e0dc9e56f2b75441d11de7ef8bf83 /src
parent602ee553e40571eeb92e7a6f397550355ba0228b (diff)
kdbus: remove attach_flags_mask module parameter setting
Diffstat (limited to 'src')
-rw-r--r--src/core/manager.c3
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c26
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.h2
-rw-r--r--src/libsystemd/sd-bus/test-bus-kernel.c2
4 files changed, 0 insertions, 33 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index ae473d05c2..a1c54339ea 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -741,9 +741,6 @@ static int manager_setup_kdbus(Manager *m) {
if (!is_kdbus_available())
return -ESOCKTNOSUPPORT;
- if (m->running_as == MANAGER_SYSTEM && detect_container(NULL) <= 0)
- bus_kernel_fix_attach_mask();
-
m->kdbus_fd = bus_kernel_create_bus(
m->running_as == MANAGER_SYSTEM ? "system" : "user",
m->running_as == MANAGER_SYSTEM, &p);
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index d5cc8100ce..417e4d5903 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -1770,32 +1770,6 @@ int bus_kernel_realize_attach_flags(sd_bus *bus) {
return 0;
}
-int bus_kernel_fix_attach_mask(void) {
- _cleanup_free_ char *mask = NULL;
- uint64_t m = (uint64_t) -1;
- char buf[2+16+2];
- int r;
-
- /* By default we don't want any kdbus metadata fields to be
- * suppressed, hence we reset the kernel mask for it to
- * (uint64_t) -1. If the module argument was overwritten by
- * the kernel cmdline, we leave it as is. */
-
- r = get_proc_cmdline_key("kdbus.attach_flags_mask=", &mask);
- if (r < 0)
- return log_warning_errno(r, "Failed to read kernel command line: %m");
-
- if (r == 0) {
- sprintf(buf, "0x%" PRIx64 "\n", m);
- r = write_string_file("/sys/module/kdbus/parameters/attach_flags_mask", buf);
- if (r < 0)
- return log_full_errno(IN_SET(r, -ENOENT, -EROFS) ? LOG_DEBUG : LOG_WARNING, r,
- "Failed to write kdbus attach mask: %m");
- }
-
- return 0;
-}
-
int bus_kernel_get_bus_name(sd_bus *bus, char **name) {
struct kdbus_cmd_info cmd = {
.size = sizeof(struct kdbus_cmd_info),
diff --git a/src/libsystemd/sd-bus/bus-kernel.h b/src/libsystemd/sd-bus/bus-kernel.h
index b9f31ba790..bb4dff6d82 100644
--- a/src/libsystemd/sd-bus/bus-kernel.h
+++ b/src/libsystemd/sd-bus/bus-kernel.h
@@ -90,8 +90,6 @@ int bus_kernel_drop_one(int fd);
int bus_kernel_realize_attach_flags(sd_bus *bus);
-int bus_kernel_fix_attach_mask(void);
-
int bus_kernel_get_bus_name(sd_bus *bus, char **name);
int bus_kernel_cmd_free(sd_bus *bus, uint64_t offset);
diff --git a/src/libsystemd/sd-bus/test-bus-kernel.c b/src/libsystemd/sd-bus/test-bus-kernel.c
index 8f4f60b65f..6506eaab2e 100644
--- a/src/libsystemd/sd-bus/test-bus-kernel.c
+++ b/src/libsystemd/sd-bus/test-bus-kernel.c
@@ -43,8 +43,6 @@ int main(int argc, char *argv[]) {
assert_se(asprintf(&name, "deine-mutter-%u", (unsigned) getpid()) >= 0);
- bus_kernel_fix_attach_mask();
-
bus_ref = bus_kernel_create_bus(name, false, &bus_name);
if (bus_ref == -ENOENT)
return EXIT_TEST_SKIP;