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


Reply via email to