diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-07-03 01:17:26 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-07-03 01:17:26 +0200 |
commit | 7f0d207d2c816e0a8cb2742b0a789911f7c99356 (patch) | |
tree | 148eea6477a079339c5ecfa1a03d7debe50fed17 /src/machine | |
parent | 8f6e22a1cafafb4e78e23c1998f23a997c1b294f (diff) |
sd-bus: support connecting to remote hosts, directly into containers
systemctl -H root@foobar:waldi
will now show a list of services running on container "waldi" on host
"foobar", using "root" for authenticating at "foobar".
Since entereing a container requires priviliges, this will only work
correctly for root logins.
Diffstat (limited to 'src/machine')
-rw-r--r-- | src/machine/machined-dbus.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index 0078a277d9..6f8ba474fa 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -41,23 +41,6 @@ #include "cgroup-util.h" #include "machined.h" -static bool valid_machine_name(const char *p) { - size_t l; - - if (!filename_is_safe(p)) - return false; - - if (!ascii_is_valid(p)) - return false; - - l = strlen(p); - - if (l < 1 || l> 64) - return false; - - return true; -} - static int method_get_machine(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) { _cleanup_free_ char *p = NULL; Manager *m = userdata; @@ -185,7 +168,7 @@ static int method_create_or_register_machine(Manager *manager, sd_bus_message *m r = sd_bus_message_read(message, "s", &name); if (r < 0) return r; - if (!valid_machine_name(name)) + if (!machine_name_is_valid(name)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid machine name"); r = sd_bus_message_read_array(message, 'y', &v, &n); |