[systemd-commits] 2 commits - src/machine src/nspawn
Lennart Poettering
lennart at kemper.freedesktop.org
Tue Jul 2 06:03:17 PDT 2013
src/machine/machined-dbus.c | 8 +-------
src/machine/org.freedesktop.machine1.conf | 4 ++++
src/nspawn/nspawn.c | 8 ++++----
3 files changed, 9 insertions(+), 11 deletions(-)
New commits:
commit 97e67f1e52ddc0c21a88cfbcab57e83c59ee627d
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Jul 2 15:03:09 2013 +0200
machined: relax access to GetMachine()
diff --git a/src/machine/org.freedesktop.machine1.conf b/src/machine/org.freedesktop.machine1.conf
index 2aad420..b2d6df3 100644
--- a/src/machine/org.freedesktop.machine1.conf
+++ b/src/machine/org.freedesktop.machine1.conf
@@ -40,6 +40,10 @@
send_interface="org.freedesktop.machine1.Manager"
send_member="ListMachines"/>
+ <allow send_destination="org.freedesktop.machine1"
+ send_interface="org.freedesktop.machine1.Manager"
+ send_member="GetMachine"/>
+
<allow receive_sender="org.freedesktop.machine1"/>
</policy>
commit 6a4e0b13473baed129522310c39f3bb70f46ed42
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Jul 2 15:02:54 2013 +0200
nspawn: use the corect method signature for CreateMachine()
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c
index a2e00d7..83a45b6 100644
--- a/src/machine/machined-dbus.c
+++ b/src/machine/machined-dbus.c
@@ -42,7 +42,7 @@
#include "virt.h"
#define BUS_MANAGER_INTERFACE \
- " <interface name=\"org.freedesktop.machine1.Manager\">\n" \
+ " <interface name=\"org.freedesktop.machine1.Manager\">\n" \
" <method name=\"GetMachine\">\n" \
" <arg name=\"name\" type=\"s\" direction=\"in\"/>\n" \
" <arg name=\"machine\" type=\"o\" direction=\"out\"/>\n" \
@@ -180,12 +180,6 @@ static int bus_manager_create_machine(Manager *manager, DBusMessage *message) {
dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
return -EINVAL;
- dbus_message_iter_get_basic(&iter, &slice);
- if (!(isempty(slice) || (unit_name_is_valid(slice, false) && endswith(slice, ".slice"))) ||
- !dbus_message_iter_next(&iter) ||
- dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
- return -EINVAL;
-
dbus_message_iter_get_basic(&iter, &root_directory);
if (!(isempty(root_directory) || path_is_absolute(root_directory)))
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 913e736..cfd88ef 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1168,16 +1168,16 @@ static int register_machine(void) {
"CreateMachine",
&error,
NULL,
- "sayssuss",
+ "sayssusa(sv)",
arg_machine,
SD_BUS_APPEND_ID128(arg_uuid),
"nspawn",
"container",
(uint32_t) 0,
- strempty(arg_slice),
- strempty(arg_directory));
+ strempty(arg_directory),
+ 1, "Slice", "s", strempty(arg_slice));
if (r < 0) {
- log_error("Failed to register machine: %s", error.message);
+ log_error("Failed to register machine: %s", error.message ? error.message : strerror(-r));
return r;
}
More information about the systemd-commits
mailing list