summaryrefslogtreecommitdiff
path: root/src/libelogind
diff options
context:
space:
mode:
Diffstat (limited to 'src/libelogind')
-rw-r--r--src/libelogind/sd-bus/bus-dump.c4
-rw-r--r--src/libelogind/sd-bus/bus-internal.h4
-rw-r--r--src/libelogind/sd-bus/bus-kernel.c2
-rw-r--r--src/libelogind/sd-bus/sd-bus.c18
4 files changed, 4 insertions, 24 deletions
diff --git a/src/libelogind/sd-bus/bus-dump.c b/src/libelogind/sd-bus/bus-dump.c
index 635403b1e..bd018db94 100644
--- a/src/libelogind/sd-bus/bus-dump.c
+++ b/src/libelogind/sd-bus/bus-dump.c
@@ -453,7 +453,11 @@ int bus_creds_dump(sd_bus_creds *c, FILE *f, bool terse) {
if (z != -ENODATA)
fprintf(f, "%sSession=%s%s%s", prefix, color, strna(s), suffix);
+#if 0 /// elogind does not support systemd units, and q is only used with them until now
if (terse && ((c->mask & SD_BUS_CREDS_CGROUP) || r != -ENODATA || q != -ENODATA || v != -ENODATA || w != -ENODATA || z != -ENODATA))
+#else
+ if (terse && ((c->mask & SD_BUS_CREDS_CGROUP) || r != -ENODATA || v != -ENODATA || w != -ENODATA || z != -ENODATA))
+#endif // 0
fputs("\n", f);
r = sd_bus_creds_get_audit_login_uid(c, &audit_loginuid);
diff --git a/src/libelogind/sd-bus/bus-internal.h b/src/libelogind/sd-bus/bus-internal.h
index 904d61038..df33ca27e 100644
--- a/src/libelogind/sd-bus/bus-internal.h
+++ b/src/libelogind/sd-bus/bus-internal.h
@@ -396,14 +396,10 @@ void bus_close_io_fds(sd_bus *b);
_cleanup_(sd_bus_unrefp) _unused_ sd_bus *_dont_destroy_##bus = sd_bus_ref(bus)
int bus_set_address_system(sd_bus *bus);
-#if 0 /// UNNEEDED by elogind
int bus_set_address_user(sd_bus *bus);
-#endif // 0
int bus_set_address_system_remote(sd_bus *b, const char *host);
int bus_set_address_system_machine(sd_bus *b, const char *machine);
-#if 0 /// UNNEEDED by elogind
-#endif // 0
int bus_get_root_path(sd_bus *bus);
int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error);
diff --git a/src/libelogind/sd-bus/bus-kernel.c b/src/libelogind/sd-bus/bus-kernel.c
index e0f521b4f..1f61bd3f9 100644
--- a/src/libelogind/sd-bus/bus-kernel.c
+++ b/src/libelogind/sd-bus/bus-kernel.c
@@ -50,5 +50,3 @@ void bus_flush_memfd(sd_bus *b) {
for (i = 0; i < b->n_memfd_cache; i++)
close_and_munmap(b->memfd_cache[i].fd, b->memfd_cache[i].address, b->memfd_cache[i].mapped);
}
-#if 0 /// UNNEEDED by elogind
-#endif // 0
diff --git a/src/libelogind/sd-bus/sd-bus.c b/src/libelogind/sd-bus/sd-bus.c
index 2a490405e..0b325e44c 100644
--- a/src/libelogind/sd-bus/sd-bus.c
+++ b/src/libelogind/sd-bus/sd-bus.c
@@ -1203,19 +1203,15 @@ _public_ int sd_bus_open_with_description(sd_bus **ret, const char *description)
if (e) {
if (streq(e, "system"))
return sd_bus_open_system_with_description(ret, description);
-#if 0 /// elogind does not support systemd user instances
else if (STR_IN_SET(e, "session", "user"))
-#endif // 0
return sd_bus_open_user_with_description(ret, description);
}
e = secure_getenv("DBUS_STARTER_ADDRESS");
if (!e) {
-#if 0 /// elogind does not support systemd user instances
if (cg_pid_get_owner_uid(0, NULL) >= 0)
return sd_bus_open_user_with_description(ret, description);
else
-#endif // 0
return sd_bus_open_system_with_description(ret, description);
}
@@ -1299,7 +1295,6 @@ _public_ int sd_bus_open_system(sd_bus **ret) {
return sd_bus_open_system_with_description(ret, NULL);
}
-#if 0 /// elogind can not open/use a user bus
int bus_set_address_user(sd_bus *b) {
const char *e;
_cleanup_free_ char *ee = NULL, *s = NULL;
@@ -1325,10 +1320,8 @@ int bus_set_address_user(sd_bus *b) {
return 0;
}
-#endif // 0
_public_ int sd_bus_open_user_with_description(sd_bus **ret, const char *description) {
-#if 0 /// elogind does not support user buses
_cleanup_(bus_freep) sd_bus *b = NULL;
int r;
@@ -1362,9 +1355,6 @@ _public_ int sd_bus_open_user_with_description(sd_bus **ret, const char *descrip
*ret = TAKE_PTR(b);
return 0;
-#else
- return sd_bus_open_system_with_description(ret, description);
-#endif // 0
}
_public_ int sd_bus_open_user(sd_bus **ret) {
@@ -3276,8 +3266,6 @@ finish:
return r;
}
-#if 0 /// UNNEEDED by elogind
-#endif // 0
_public_ int sd_bus_add_match(
sd_bus *bus,
sd_bus_slot **slot,
@@ -3651,11 +3639,7 @@ _public_ int sd_bus_default_system(sd_bus **ret) {
}
_public_ int sd_bus_default_user(sd_bus **ret) {
-#if 0 /// elogind does not support user buses
return bus_default(sd_bus_open_user, &default_user_bus, ret);
-#else
- return sd_bus_default_system(ret);
-#endif // 0
}
_public_ int sd_bus_default(sd_bus **ret) {
@@ -4030,9 +4014,7 @@ static void flush_close(sd_bus *bus) {
_public_ void sd_bus_default_flush_close(void) {
flush_close(default_starter_bus);
-#if 0 /// elogind does not support user buses
flush_close(default_user_bus);
-#endif // 0
flush_close(default_system_bus);
}