sd-bus: allow connecting to the pseudo-container ".host"

machined exposes the pseudo-container ".host" as a reference to the host
system, and this means "machinectl login .host" and "machinectl shell
.host" get your a login/shell on the host. systemd-run currently doesn't
allow that. Let's fix that, and make sd-bus understand ".host" as an
alias for connecting to the host system.
This commit is contained in:
Lennart Poettering
2018-07-25 22:48:11 +02:00
parent 7bd4bcf740
commit 1e5057b904
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -230,6 +230,11 @@ int container_get_leader(const char *machine, pid_t *pid) {
assert(machine);
assert(pid);
if (streq(machine, ".host")) {
*pid = 1;
return 0;
}
if (!machine_name_is_valid(machine))
return -EINVAL;