chiark / gitweb /
systemctl: refuse --host with cat
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 29 Jan 2015 02:30:06 +0000 (21:30 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 29 Jan 2015 02:56:10 +0000 (21:56 -0500)
This might be fixed one day, but for now it's better to fail.

https://bugzilla.redhat.com/show_bug.cgi?id=1186952

TODO
src/systemctl/systemctl.c

diff --git a/TODO b/TODO
index 2fee133aa896defdfbe1172d02789da309f93f20..3c5e0f74f35b7c75762bc11eea23e8778216a123 100644 (file)
--- a/TODO
+++ b/TODO
@@ -16,6 +16,9 @@ Bugfixes:
   str_split_quoted() should return a real return code, so spawn_child can
   report the failure properly.
 
   str_split_quoted() should return a real return code, so spawn_child can
   report the failure properly.
 
+* When systemctl --host is used, underlying ssh connection can remain open.
+  bus_close does not kill children?
+
 External:
 
 * Fedora: add an rpmlint check that verifies that all unit files in the RPM are listed in %systemd_post macros.
 External:
 
 * Fedora: add an rpmlint check that verifies that all unit files in the RPM are listed in %systemd_post macros.
index 66c0b9949e44dd3b3e06c7ac547a0bebbca2cd58..11b0be001f69053a621fa8c3f1b1bf208f03ac56 100644 (file)
@@ -4563,6 +4563,11 @@ static int cat(sd_bus *bus, char **args) {
 
         assert(args);
 
 
         assert(args);
 
+        if (arg_host) {
+                log_error("Option --host cannot be used with 'cat'");
+                return -EINVAL;
+        }
+
         r = init_home_and_lookup_paths(&user_home, &user_runtime, &lp);
         if (r < 0)
                 return r;
         r = init_home_and_lookup_paths(&user_home, &user_runtime, &lp);
         if (r < 0)
                 return r;