io.c only treats a short read as the EOF sentinel when the fd is still
open; xattrs.c never stores a -1 from find_matching_xattr() and guards
ndx < 0 in set_xattr; rsync-ssl refuses the gnutls backend without
RSYNC_SSL_CA_CERT.
Co-authored-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quote and newline-escape the arguments written into the --write-batch replay
script so a crafted filename cannot inject shell, and tighten rsync-ssl's option
handling.
Validate the hostname passed to the rsync-ssl helper (reject option-injection
/ shell-metacharacter hostnames) and require a CA certificate in stunnel mode
so the server certificate is actually verified.
Tests: rsync-ssl-hostname-validation, rsync-ssl-stunnel-ca-required.