haproxy/src
William Lallemand df6c5a8ffa BUG/MEDIUM: mworker: fix the copy of options in copy_argv()
The copy_argv() function, which is used to copy and remove some of the
arguments of the command line in order to re-exec() the master process,
is poorly implemented.

The function tries to remove the -x and the -sf/-st options but without
taking into account that some of the options could take a parameter
starting with a dash.

In issue #644, haproxy starts with "-L -xfoo" which is perfectly
correct. However, the re-exec is done without "-xfoo" because the master
tries to remove the "-x" option. Indeed, the copy_argv() function does
not know how much arguments an option can have, and just assume that
everything starting with a dash is an option. So haproxy is exec() with
"-L" but without a parameter, which is wrong and leads to the exit of
the master, with usage().

To fix this issue, copy_argv() must know how much parameters an option
takes, and copy or skip the parameters correctly.

This fix is a first step but it should evolve to a cleaner way of
declaring the options to avoid deduplication of the parsing code, so we
avoid new bugs.

Should be backported with care as far as 1.8, by removing the options
that does not exists in the previous versions.
2020-06-05 14:30:34 +02:00
..
51d.c BUG/MINOR: 51d: Fix HTX message prefetch 2020-05-05 11:53:43 +02:00
acl.c CLEANUP: acl: remove unused assignment 2020-05-18 09:21:27 +02:00
action.c MINOR: tcp-rules: Make tcp-request capture a custom action 2020-01-20 15:18:45 +01:00
activity.c CLEANUP: cli: replace all occurrences of manual handling of return messages 2019-08-09 11:26:10 +02:00
applet.c BUG/MEDIUM: applet: always check a fast running applet's activity before killing 2019-10-11 16:05:57 +02:00
arg.c BUG/MINOR: arg: don't reject missing optional args 2020-02-28 16:41:29 +01:00
auth.c BUILD/MINOR: auth: enabling for osx 2019-09-08 12:20:13 +02:00
backend.c BUG/MEDIUM: backend: set the connection owner to the session when using alpn. 2020-05-27 01:34:33 +02:00
base64.c BUG/MINOR: base64: dec func ignores padding for output size checking 2019-01-14 19:32:15 +01:00
buffer.c BUG/MINOR: buffers: MT_LIST_DEL_SAFE() expects the temporary pointer. 2020-03-10 17:44:40 +01:00
cache.c BUG/MINOR: cache: Don't needlessly test "cache" keyword in parse_cache_flt() 2020-05-18 17:47:18 +02:00
calltrace.c REORG: trace: rename trace.c to calltrace.c and mention it's not thread-safe 2019-08-22 20:21:00 +02:00
cfgparse-global.c Revert "MEDIUM: sink: add global statement to create a new ring (sink buffer)" 2020-05-20 12:06:16 +02:00
cfgparse-listen.c MAJOR: checks: Implement HTTP check using tcp-check rules 2020-04-27 09:39:38 +02:00
cfgparse-ssl.c MINOR: ssl: split config and runtime variable for ssl-{min,max}-ver 2020-05-20 16:49:02 +02:00
cfgparse.c BUG/MINOR: checks: Fix test on http-check rulesets during config validity check 2020-06-03 19:08:35 +02:00
channel.c BUG/MINOR: channel: inject output data at the end of output 2020-01-07 10:51:15 +01:00
checks.c BUG/MEDIUM: checks: Don't add a tcpcheck ruleset twice in the shared tree 2020-05-29 08:20:17 +02:00
chunk.c CLEANUP: assorted typo fixes in the code and comments 2020-05-11 10:11:29 +02:00
cli.c MINOR: applet: adopt the wait list entry from the CLI 2020-05-19 19:37:12 +02:00
compression.c MINOR: time: move the cpu, mono, and idle time to thread_info 2019-05-20 21:14:14 +02:00
connection.c BUG/MEDIUM: connection: Ignore PP2 unique ID for stream-less connections 2020-05-26 17:36:01 +02:00
da.c BUG/MINOR: da: Fix HTX message prefetch 2020-05-05 11:50:14 +02:00
debug.c BUG/MINOR: debug: properly use long long instead of long for the thread ID 2020-05-01 12:26:03 +02:00
dict.c BUG/MINOR: dict: race condition fix when inserting dictionary entries. 2019-06-11 09:54:12 +02:00
dns.c BUG/MEDIUM: dns: Consider the fact that dns answers are case-insensitive 2020-04-01 18:35:05 +02:00
ev_epoll.c CLEANUP: remove support for USE_MY_EPOLL 2020-03-10 07:08:10 +01:00
ev_evports.c CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00
ev_kqueue.c BUILD: remove obsolete support for -mregparm / USE_REGPARM 2020-02-25 07:41:47 +01:00
ev_poll.c BUG/MINOR: pollers: remove uneeded free in global init 2020-05-13 11:45:37 +02:00
ev_select.c BUILD: select: only declare existing local labels to appease clang 2020-05-13 16:25:26 +02:00
fcgi-app.c CLEANUP: Use isttest() and istfree() 2020-03-05 19:52:07 +01:00
fcgi.c BUILD: general: always pass unsigned chars to is* functions 2020-02-25 08:16:33 +01:00
fd.c CLEANUP: src/fd.c: mask setsockopt with DISGUISE 2020-04-02 15:10:17 +02:00
filters.c MINOR: config: Don't dump keywords if argument is NULL 2020-05-18 18:30:06 +02:00
flt_http_comp.c MINOR: compression/filters: Initialize the comp filter when stream is created 2020-03-06 15:36:04 +01:00
flt_spoe.c CLEANUP: assorted typo fixes in the code and comments 2020-04-02 16:25:45 +02:00
flt_trace.c BUG/MEDIUM: random: implement a thread-safe and process-safe PRNG 2020-03-08 10:09:02 +01:00
freq_ctr.c BUG/MAJOR: threads/freq_ctr: use a memory barrier to detect changes 2017-10-31 18:01:18 +01:00
frontend.c MINOR: use DISGUISE() everywhere we deliberately want to ignore a result 2020-03-14 11:04:49 +01:00
h1_htx.c MEDIUM: h1-htx: Add HTX EOM block when the message is in H1_MSG_DONE state 2019-12-11 16:46:16 +01:00
h1.c BUG/MEDIUM: h1: Don't compare host and authority if only h1 headers are parsed 2020-05-04 09:27:01 +02:00
h2.c CLEANUP: assorted typo fixes in the code and comments 2020-04-02 16:25:45 +02:00
haproxy.c BUG/MEDIUM: mworker: fix the copy of options in copy_argv() 2020-06-05 14:30:34 +02:00
hash.c BUG/MAJOR: hashes: fix the signedness of the hash inputs 2020-01-16 08:23:42 +01:00
hathreads.c BUILD/MEDIUM: threads: rename thread_info struct to ha_thread_info 2019-10-17 07:15:17 +02:00
hlua_fcn.c BUG/MINOR: lua: Add missing string length for lua sticktable lookup 2020-05-28 15:15:52 +02:00
hlua.c BUG/MEDIUM: hlua: Lock pattern references to perform set/add/del operations 2020-06-03 19:08:35 +02:00
hpack-dec.c CLEANUP: Use isttest() and istfree() 2020-03-05 19:52:07 +01:00
hpack-enc.c BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-huff.c BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
hpack-tbl.c MEDIUM: hpack: use a pool for the hpack table 2020-05-19 11:40:39 +02:00
http_acl.c MEDIUM: init: convert all trivial registration calls to initcalls 2018-11-26 19:50:32 +01:00
http_act.c MINOR: http-rules: Use an action function to eval http-request auth rules 2020-05-28 15:07:20 +02:00
http_ana.c MINOR: http-rules: Use an action function to eval http-request auth rules 2020-05-28 15:07:20 +02:00
http_conv.c BUG/MEDIUM: capture: capture-req/capture-res converters crash without a stream 2020-04-29 11:29:17 +02:00
http_fetch.c MINOR: checks/sample: Remove unnecessary tests on the sample session 2020-05-06 12:44:46 +02:00
http_htx.c CLEANUP: http: Remove unused HTTP message templates 2020-05-28 15:07:20 +02:00
http_rules.c MEDIUM: http: Add a ruleset evaluated on all responses just before forwarding 2020-02-06 14:55:34 +01:00
http.c CLEANUP: http: Remove unused HTTP message templates 2020-05-28 15:07:20 +02:00
htx.c MINOR: htx: Use htx_find_offset() to truncate an HTX message 2020-03-06 14:12:59 +01:00
lb_chash.c BUG/MEDIUM: lb-chash: Ensure the tree integrity when server weight is increased 2019-08-01 11:35:29 +02:00
lb_fas.c BUG/MEDIUM: lb_fas: Don't test the server's lb_tree from outside the lock 2019-07-05 14:26:15 +02:00
lb_fwlc.c BUG/MINOR: lb/leastconn: ignore the server weights for empty servers 2019-09-06 17:13:44 +02:00
lb_fwrr.c BUG/MAJOR: lb/threads: make sure the avoided server is not full on second pass 2019-05-27 10:29:59 +02:00
lb_map.c CLEANUP: assorted typo fixes in the code and comments 2020-04-02 16:25:45 +02:00
listener.c MINOR: config: Don't dump keywords if argument is NULL 2020-05-18 18:30:06 +02:00
log.c BUG/MEDIUM: logs: fix trailing zeros on log message. 2020-05-28 15:30:51 +02:00
lru.c MINOR: lru: new function to delete <nb> least recently used keys 2016-01-11 07:31:35 +01:00
mailers.c
map.c CLEANUP: cli: replace all occurrences of manual handling of return messages 2019-08-09 11:26:10 +02:00
memory.c CLEANUP: pools: use the regular lock for the flush operation on lockless pools 2020-05-29 17:28:04 +02:00
mux_fcgi.c BUG/MAJOR: mux-fcgi: Stop sending loop if FCGI stream is blocked for any reason 2020-05-19 16:00:55 +02:00
mux_h1.c MINOR: mux-h1/proxy: Add a proxy option to disable clear h2 upgrade 2020-06-03 10:23:39 +02:00
mux_h2.c MEDIUM: hpack: use a pool for the hpack table 2020-05-19 11:40:39 +02:00
mux_pt.c MINOR: mux_pt: Don't try to remove the connection from the idle list. 2020-03-17 13:38:18 +01:00
mworker-prog.c MEDIUM: mworker-prog: Add user/group options to program section 2019-07-15 16:43:16 +02:00
mworker.c MINOR: mworker: replace ha_alert by ha_warning when exiting successfuly 2020-05-06 17:27:03 +02:00
namespace.c BUG/MINOR: namespace: avoid closing fd when socket failed in my_socketat 2020-02-14 04:23:08 +01:00
pattern.c BUG/MINOR: pattern: Do not pass len = 0 to calloc() 2020-03-18 05:17:28 +01:00
payload.c MINOR: checks/sample: Remove unnecessary tests on the sample session 2020-05-06 12:44:46 +02:00
peers.c BUG/MINOR: peers: fix internal/network key type mapping. 2020-06-02 16:25:19 +02:00
pipe.c BUG/MEDIUM: pipe/thread: fix atomicity of pipe counters 2020-01-30 09:15:37 +01:00
proto_sockpair.c MINOR: tcp/uxst/sockpair: only ask for I/O when really waiting for a connect() 2020-03-04 19:29:12 +01:00
proto_tcp.c BUG/MINOR: rules: Increment be_counters if backend is assigned for a silent-drop 2020-03-06 15:36:04 +01:00
proto_udp.c BUG/MEDIUM: proto_udp/threads: recv() and send() must not be exclusive. 2019-12-10 19:09:15 +01:00
proto_uxst.c MINOR: tcp/uxst/sockpair: only ask for I/O when really waiting for a connect() 2020-03-04 19:29:12 +01:00
protocol.c BUG/MEDIUM: protocols: add a global lock for the init/deinit stuff 2019-07-24 16:45:02 +02:00
proxy.c MINOR: mux-h1/proxy: Add a proxy option to disable clear h2 upgrade 2020-06-03 10:23:39 +02:00
queue.c MINOR: sample: make sample_parse_expr() able to return an end pointer 2020-02-14 19:02:06 +01:00
raw_sock.c CLEANUP: assorted typo fixes in the code and comments 2020-03-31 17:09:35 +02:00
regex.c CLEANUP: regex: remove outdated support for regex actions 2020-06-02 17:17:13 +02:00
ring.c MINOR: ring: re-work ring attach generic API. 2020-05-31 10:37:31 +02:00
sample.c MINOR: http-htx/proxy: Add http-error directive using http return syntax 2020-05-20 18:27:14 +02:00
server.c MEDIUM: ring: add new srv statement to support octet counting forward 2020-05-31 10:49:43 +02:00
session.c MAJOR: checks: Implement HTTP check using tcp-check rules 2020-04-27 09:39:38 +02:00
sha1.c BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
shctx.c BUG/MEDIUM: shctx: make sure to keep all blocks aligned 2020-02-21 13:45:58 +01:00
signal.c BUG/MEDIUM: wdt: Don't ignore WDTSIG and DEBUGSIG in __signal_process_queue(). 2020-03-18 13:10:05 +01:00
sink.c BUILD: sink: address build warning on 32-bit architectures 2020-06-02 12:01:51 +02:00
ssl_ckch.c REORG: ssl: move utility functions to src/ssl_utils.c 2020-05-15 14:11:54 +02:00
ssl_crtlist.c CLEANUP: ssl: remove comment from dump_crtlist_sslconf() 2020-06-02 11:54:46 +02:00
ssl_sample.c REORG: ssl: move utility functions to src/ssl_utils.c 2020-05-15 14:11:54 +02:00
ssl_sock.c Revert "MINOR: ssl: rework add cert chain to CTX to be libssl independent" 2020-06-02 18:37:42 +02:00
ssl_utils.c REORG: ssl: move utility functions to src/ssl_utils.c 2020-05-15 14:11:54 +02:00
standard.c CLEANUP: assorted typo fixes in the code and comments 2020-05-11 10:11:29 +02:00
stats.c MEDIUM: stats: Enable more accurate moving average calculation for stats 2020-05-16 22:40:06 +02:00
stick_table.c CLEANUP: assorted typo fixes in the code and comments 2020-04-16 10:04:36 +02:00
stream_interface.c BUG/MINOR: connection: Always get the stream when available to send PP2 line 2020-05-26 17:39:39 +02:00
stream.c MEDIUM: stats: Enable more accurate moving average calculation for stats 2020-05-16 22:40:06 +02:00
task.c CLEANUP: assorted typo fixes in the code and comments 2020-04-17 09:37:36 +02:00
tcp_rules.c MINOR: sample: make sample_parse_expr() able to return an end pointer 2020-02-14 19:02:06 +01:00
time.c BUILD: remove obsolete support for -mregparm / USE_REGPARM 2020-02-25 07:41:47 +01:00
trace.c MEDIUM: sink: build header in sink_write for log formats 2020-05-19 11:04:11 +02:00
uri_auth.c MINOR: stats: replace the ST_* uri_auth flags with STAT_* 2019-10-10 11:30:07 +02:00
vars.c MINOR: vars: Make vars_(un|)set_by_name(_ifexist|) return a success value 2020-05-25 08:12:27 +02:00
version.c MINOR: version: make the version strings variables, not constants 2019-10-16 09:56:57 +02:00
wdt.c MINOR: wdt: Move the definitions of WDTSIG and DEBUGSIG into types/signal.h. 2020-03-18 13:07:19 +01:00
wurfl.c CLEANUP: assorted typo fixes in the code and comments 2020-05-11 10:11:29 +02:00
xprt_handshake.c BUG/MINOR: connection/debug: do not enforce !event_type on subscribe() anymore 2020-03-05 07:46:33 +01:00
xxhash.c BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00