summaryrefslogtreecommitdiff
path: root/src/machine/machine-dbus.c
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-09-13 21:17:38 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-09-13 21:17:38 -0400
commitc73c7c774cbd1f0e778254d51da819490a333ab4 (patch)
tree2db5fa808791e0b4fc671537690264caee56e6da /src/machine/machine-dbus.c
parent5496aef5f410ca665c76fb1bbfb584c7925fd49e (diff)
parentb3ec0a0674f4e499bcb6d2469acdf9d2d574c3d6 (diff)
Merge branch 'systemd/parabola' into notsystemd/premove
# Conflicts: # Makefile.am # tmpfiles.d/etc.conf.m4
Diffstat (limited to 'src/machine/machine-dbus.c')
-rw-r--r--src/machine/machine-dbus.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index 7b9aa66d63..ba7ac04b56 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -655,8 +655,7 @@ int bus_machine_method_open_shell(sd_bus_message *message, void *userdata, sd_bu
r = sd_bus_message_read(message, "ss", &user, &path);
if (r < 0)
return r;
- if (isempty(user))
- user = NULL;
+ user = empty_to_null(user);
if (isempty(path))
path = "/bin/sh";
if (!path_is_absolute(path))
@@ -1201,8 +1200,6 @@ int bus_machine_method_copy(sd_bus_message *message, void *userdata, sd_bus_erro
child_fail:
(void) write(errno_pipe_fd[1], &r, sizeof(r));
- errno_pipe_fd[1] = safe_close(errno_pipe_fd[1]);
-
_exit(EXIT_FAILURE);
}
@@ -1210,7 +1207,7 @@ int bus_machine_method_copy(sd_bus_message *message, void *userdata, sd_bus_erro
/* Copying might take a while, hence install a watch on the child, and return */
- r = operation_new(m->manager, m, child, message, errno_pipe_fd[0]);
+ r = operation_new(m->manager, m, child, message, errno_pipe_fd[0], NULL);
if (r < 0) {
(void) sigkill_wait(child);
return r;