summaryrefslogtreecommitdiff
path: root/src/grp-machine/systemd-machined/machine-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/grp-machine/systemd-machined/machine-dbus.c')
-rw-r--r--src/grp-machine/systemd-machined/machine-dbus.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/grp-machine/systemd-machined/machine-dbus.c b/src/grp-machine/systemd-machined/machine-dbus.c
index 95f2084455..91b5dfa993 100644
--- a/src/grp-machine/systemd-machined/machine-dbus.c
+++ b/src/grp-machine/systemd-machined/machine-dbus.c
@@ -656,8 +656,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))
@@ -1202,8 +1201,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);
}
@@ -1211,7 +1208,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;