mirror of
https://github.com/systemd/systemd.git
synced 2025-02-04 21:47:31 +03:00
sd-bus: use -- when passing arguments to ssh (#6706)
This prevents `systemctl` from runnning /bin/touch when the following command is used: ``` systemctl -H '-oProxyCommand=/bin/touch i-shouldnt-be-here' show-environment ```
This commit is contained in:
parent
ea89a119cd
commit
58c6e4a2c0
@ -1186,7 +1186,7 @@ int bus_set_address_system_remote(sd_bus *b, const char *host) {
|
||||
if (!e)
|
||||
return -ENOMEM;
|
||||
|
||||
c = strjoina(",argv4=--machine=", m);
|
||||
c = strjoina(",argv5=--machine=", m);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1196,7 +1196,7 @@ int bus_set_address_system_remote(sd_bus *b, const char *host) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
b->address = strjoin("unixexec:path=ssh,argv1=-xT,argv2=", e, ",argv3=systemd-stdio-bridge", c);
|
||||
b->address = strjoin("unixexec:path=ssh,argv1=-xT,argv2=--,argv3=", e, ",argv4=systemd-stdio-bridge", c);
|
||||
if (!b->address)
|
||||
return -ENOMEM;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user