diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2017-08-31 11:38:30 +0300 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-09-25 14:36:18 +0200 |
commit | bc8491844602f0d0626af7ff9e0f988a546bf1d7 (patch) | |
tree | 03303e009d6bc09061e110c2b25fd7642f089fa7 /src | |
parent | 0c642978ccb2102139bd9e96ce5e8675e200b10f (diff) |
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
```
Diffstat (limited to 'src')
-rw-r--r-- | src/libelogind/sd-bus/sd-bus.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libelogind/sd-bus/sd-bus.c b/src/libelogind/sd-bus/sd-bus.c index 3f2d1b0bc..7bc0c056b 100644 --- a/src/libelogind/sd-bus/sd-bus.c +++ b/src/libelogind/sd-bus/sd-bus.c @@ -49,7 +49,6 @@ #include "macro.h" #include "missing.h" #include "parse-util.h" -#include "process-util.h" #include "string-util.h" #include "strv.h" #include "util.h" @@ -1209,7 +1208,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); } } @@ -1219,7 +1218,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; |