Files
rsync/lib
Vladimir Marek 0c96e12fd6 lib/sysxattrs: make write_xattr more robust
Fix three bugs in the Solaris extended-attribute write loop and harden it:
 - the write() length stayed the full size rather than the remaining
   (size - bufpos), so a short write would re-write from the wrong offset;
 - on a failed or zero-byte write, bufpos = -1 wrapped to SIZE_MAX (bufpos is
   size_t) and the final `bufpos > 0` test then returned success;
 - an empty value (size == 0) returned failure because `bufpos > 0` was false.
Also don't let close() clobber the write error's errno, and report a close()
failure on an otherwise-successful write.
2026-06-30 08:36:22 +10:00
..
2020-07-11 11:39:36 -07:00
2022-03-03 17:00:57 -08:00
2020-05-24 22:50:51 -07:00
2019-03-16 09:15:49 -07:00
2006-01-02 17:46:12 +00:00