machined,bus-proxy: fix connecting to containers
This commit is contained in:
parent
8531ae707d
commit
146d477367
|
@ -139,9 +139,9 @@ static int parse_argv(int argc, char *argv[]) {
|
|||
return log_oom();
|
||||
|
||||
#ifdef ENABLE_KDBUS
|
||||
a = strjoin("x-container-kernel:machine=", e, ";x-container-unix:machine=", e, NULL);
|
||||
a = strjoin("x-machine-kernel:machine=", e, ";x-machine-unix:machine=", e, NULL);
|
||||
#else
|
||||
a = strjoin("x-container-unix:machine=", e, NULL);
|
||||
a = strjoin("x-machine-unix:machine=", e, NULL);
|
||||
#endif
|
||||
if (!a)
|
||||
return log_oom();
|
||||
|
|
|
@ -952,7 +952,7 @@ static int bus_parse_next_address(sd_bus *b) {
|
|||
break;
|
||||
} else if (startswith(a, "x-machine-unix:")) {
|
||||
|
||||
a += 17;
|
||||
a += 15;
|
||||
r = parse_container_unix_address(b, &a, &guid);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
@ -960,7 +960,7 @@ static int bus_parse_next_address(sd_bus *b) {
|
|||
break;
|
||||
} else if (startswith(a, "x-machine-kernel:")) {
|
||||
|
||||
a += 19;
|
||||
a += 17;
|
||||
r = parse_container_kernel_address(b, &a, &guid);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
|
|
@ -463,9 +463,9 @@ int bus_machine_method_open_login(sd_bus *bus, sd_bus_message *message, void *us
|
|||
return r;
|
||||
|
||||
#ifdef ENABLE_KDBUS
|
||||
asprintf(&container_bus->address, "x-container-kernel:pid=" PID_FMT ";x-container-unix:pid=" PID_FMT, m->leader, m->leader);
|
||||
asprintf(&container_bus->address, "x-machine-kernel:pid=" PID_FMT ";x-machine-unix:pid=" PID_FMT, m->leader, m->leader);
|
||||
#else
|
||||
asprintf(&container_bus->address, "x-container-kernel:pid=" PID_FMT, m->leader);
|
||||
asprintf(&container_bus->address, "x-machine-kernel:pid=" PID_FMT, m->leader);
|
||||
#endif
|
||||
if (!container_bus->address)
|
||||
return -ENOMEM;
|
||||
|
|
Loading…
Reference in New Issue