rrsync: refuse a peer-selected --debug

The --debug=FILTER traces print rule text and merge-file names that came
out of a file's contents -- and a word-split per-dir merge (":w- FILE")
turns every word of a file into a merge-file name, so the trace echoes
what the syntax errors no longer do, with nothing failing to parse.

Redacting every trace would mean carrying provenance on each rule, which
a deferred ":" merge does not currently keep.  For a restricted account
the cheaper answer is to deny the peer the switch: server_options() only
ever forwards --info, so no stock client sends --debug to a server and
the only way it arrives is a deliberate -M--debug=.  An operator
debugging their own server is unaffected.

Disabled rather than deleted from the table, because that table is
generated by the cull-options script and a regeneration would put the
line back; the test would then catch it.

(cherry picked from commit 631f9bd464)
This commit is contained in:
Andrew Tridgell committed 2026-08-02 21:33:25 +10:00
1 parent c42e314384
commit a504944bb1
1 file changed
+1 -1
+1 -1
View File
@@ -51,7 +51,7 @@ long_opts = {
'copy-devices': -1,
'copy-unsafe-links': 0,
'daemon': -1,
'debug': 1,
'debug': -1,
'delay-updates': 0,
'delete': 0,
'delete-after': 0,