diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-08-05 00:13:27 +0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-08-05 00:13:27 +0300 |
commit | b736ee0b0c07b0652258d32042c009321f82f0d3 (patch) | |
tree | 4175e28a13060f9d699594db4aa77e4016b9a85b /src/machine/machine-dbus.c | |
parent | 5386501fcc854aefa74f65e37feec848dc41ff43 (diff) | |
parent | 1fe6fa167902199b6d0190697368bb1e80aeb465 (diff) |
Merge pull request #855 from richardmaw-codethink/machinectl-copy-to-from-relative-paths-v2
Allow relative paths in `machinectl copy-{from,to}` (v2)
Diffstat (limited to 'src/machine/machine-dbus.c')
-rw-r--r-- | src/machine/machine-dbus.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index dc42ffdc52..7658d7146d 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -825,13 +825,13 @@ int bus_machine_method_copy(sd_bus_message *message, void *userdata, sd_bus_erro if (r < 0) return r; - if (!path_is_absolute(src) || !path_is_safe(src)) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Source path must be absolute and not contain ../."); + if (!path_is_absolute(src)) + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Source path must be absolute."); if (isempty(dest)) dest = src; - else if (!path_is_absolute(dest) || !path_is_safe(dest)) - return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Destination path must be absolute and not contain ../."); + else if (!path_is_absolute(dest)) + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Destination path must be absolute."); r = bus_verify_polkit_async( message, |