Skip to content

Commit e095ddb

Browse files
N-R-Knavi-desu
authored andcommitted
openrc-user: fix botched argument
argv[0] should've been "-", not argv[1]. Fixes: 704dcdc
1 parent 4edfe98 commit e095ddb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/openrc-user/openrc-user.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323

2424
static bool spawn_openrc(const struct passwd *user, bool start) {
2525
const char *argv[] = {
26-
user->pw_shell, "-", "-c",
27-
start ? USER_SH "start" : USER_SH "stop", NULL
26+
"-", "-c", start ? USER_SH "start" : USER_SH "stop", NULL
2827
};
2928
struct exec_result res;
3029
struct exec_args args = exec_init(argv);
30+
args.cmd = user->pw_shell;
3131
args.uid = user->pw_uid;
3232
args.gid = user->pw_gid;
3333
res = do_exec(&args);

0 commit comments

Comments
 (0)