[systemd-commits] src/machine

Thomas H.P. Andersen phomes at kemper.freedesktop.org
Tue Feb 24 11:51:35 PST 2015


 src/machine/machine-dbus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 858a109f4a336be6c258ae615d31651347b9b67b
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Feb 24 20:47:53 2015 +0100

    machined: fix check if host directory could be opened
    
    CID#1271351

diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 334abbd..15c9159 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -871,7 +871,7 @@ int bus_machine_method_copy(sd_bus *bus, sd_bus_message *message, void *userdata
         container_dirname = dirname(t);
 
         hostfd = open(host_dirname, O_CLOEXEC|O_RDONLY|O_NOCTTY|O_DIRECTORY);
-        if (r < 0)
+        if (hostfd < 0)
                 return sd_bus_error_set_errnof(error, errno, "Failed to open host directory %s: %m", host_dirname);
 
         if (pipe2(errno_pipe_fd, O_CLOEXEC|O_NONBLOCK) < 0)



More information about the systemd-commits mailing list