[hackers] [sbase] [PATCH v2 00/11] IO improvements and some bug fixes

From: Michael Forney <mforney_AT_mforney.org>
Date: Tue, 6 Dec 2016 02:16:52 -0800

Thanks to Silvan, Hiltjo, and Laslo for their comments.

Changes since v1:
- Changed concat to return -2 on write error so that callers have the option to
  handle it differently.
- Added a patch to libutil/cp.c to preserve atime/mtime for symlinks.
- Changed the od overflow fix to be a bit clearer and avoid casting off_t to
  size_t.
- Switched tail to use raw IO and concat as well.
- Added a patch to tail to make -c offsets refer to bytes instead of runes.

Michael Forney (11):
  crypt: Add some missing error checks for cryptsum
  od: Fix buffer overflow if -N flag is larger than BUFSIZ
  libutil: Add writeall utility function
  Don't use buffered IO (fread) when not appropriate
  xinstall: Check result of fchmod
  concat: Use plain read/write instead of buffered stdio
  cp: Only call chmod with -p or -a
  tail: Use fstat in case file is removed
  cp: Check result of utimensat
  cp: Also preserve atime/mtime for symlinks
  tail: Process bytes with -c option, and add -m option for runes

 Makefile | 3 +-
 cat.c | 39 ++++-----
 cksum.c | 31 +++----
 crypt.h | 2 +-
 libutil/concat.c | 24 +++---
 libutil/cp.c | 56 ++++++-------
 libutil/crypt.c | 47 ++++++-----
 libutil/writeall.c | 21 +++++
 od.c | 55 ++++++++-----
 sponge.c | 31 +++----
 tail.1 | 6 +-
 tail.c | 236 +++++++++++++++++++++++++++++++++--------------------
 tee.c | 39 +++++----
 text.h | 1 -
 util.h | 4 +
 xinstall.c | 26 +++---
 16 files changed, 358 insertions(+), 263 deletions(-)
 create mode 100644 libutil/writeall.c

-- 
2.10.2
Received on Tue Dec 06 2016 - 11:16:52 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 06 2016 - 11:24:18 CET