mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02:00
BUG/MEDIUM: mworker: execvp failure depending on argv[0]
The copy_argv() function lacks a check on '-' to remove the -x, -sf and -st parameters. When reloading a master process with a path starting by /st, /sf, or /x.. the copy_argv() function skipped argv[0] leading to an execvp() without the binary.
This commit is contained in:
parent
2ec2db9725
commit
29f690c945
@ -1242,7 +1242,8 @@ static char **copy_argv(int argc, char **argv)
|
||||
|
||||
while (i < argc) {
|
||||
/* -sf or -st or -x */
|
||||
if ((argv[i][1] == 's' && (argv[i][2] == 'f' || argv[i][2] == 't')) || argv[i][1] == 'x' ) {
|
||||
if (i > 0 && argv[i][0] == '-' &&
|
||||
((argv[i][1] == 's' && (argv[i][2] == 'f' || argv[i][2] == 't')) || argv[i][1] == 'x' )) {
|
||||
/* list of pids to finish ('f') or terminate ('t') or unix socket (-x) */
|
||||
i++;
|
||||
while (i < argc && argv[i][0] != '-') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user