X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=execute.c;h=ef24f71a253d0f369c9644689bdcb2c2af73c1b8;hb=afb757b1a8a416b3c692728330a266b3915eef41;hp=fe3dc8b251c502c33b6f2eacbfdcc880b6bbec1b;hpb=15ae422b7471cf6f41ccf450243d8afd8ea0a054;p=elogind.git diff --git a/execute.c b/execute.c index fe3dc8b25..ef24f71a2 100644 --- a/execute.c +++ b/execute.c @@ -35,6 +35,7 @@ #include #include #include +#include #include "execute.h" #include "strv.h" @@ -391,8 +392,8 @@ static int chown_terminal(int fd, uid_t uid) { assert(fd >= 0); /* This might fail. What matters are the results. */ - fchown(fd, uid, -1); - fchmod(fd, TTY_MODE); + (void) fchown(fd, uid, -1); + (void) fchmod(fd, TTY_MODE); if (fstat(fd, &st) < 0) return -errno; @@ -467,7 +468,7 @@ fail: return r; } -static int restore_conform_stdio(const ExecContext *context, +static int restore_confirm_stdio(const ExecContext *context, int *saved_stdin, int *saved_stdout, bool *keep_stdin, @@ -723,6 +724,7 @@ int exec_spawn(ExecCommand *command, char **argv, const ExecContext *context, int fds[], unsigned n_fds, + char **environment, bool apply_permissions, bool apply_chroot, bool confirm_spawn, @@ -822,7 +824,7 @@ int exec_spawn(ExecCommand *command, } /* Release terminal for the question */ - if ((r = restore_conform_stdio(context, + if ((r = restore_confirm_stdio(context, &saved_stdin, &saved_stdout, &keep_stdin, &keep_stdout))) goto fail; @@ -1033,7 +1035,7 @@ int exec_spawn(ExecCommand *command, goto fail; } - if (!(final_env = strv_env_merge(environ, our_env, context->environment, NULL))) { + if (!(final_env = strv_env_merge(environment, our_env, context->environment, NULL))) { r = EXIT_MEMORY; goto fail; }