machined: fix check if host directory could be opened

CID#1271351
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-02-24 20:51:28 +01:00
parent 76dcbc4992
commit 858a109f4a
+1 -1
View File
@@ -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)