(main) Avoid a minor race condition when `-m MODE' is specified, by using
authorJim Meyering <jim@meyering.net>
Mon, 19 Dec 2005 18:18:03 +0000 (18:18 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 19 Dec 2005 18:18:03 +0000 (18:18 +0000)
commitfa6cfcb9ce13b810d8dc88a7b562927636ecaa30
tree1fecf2f5fe85bd7faa7806d3a64a7901a849fcc5
parent52893ffd2a3ff896e0b51f3f35bca191b71a47d4
(main) Avoid a minor race condition when `-m MODE' is specified, by using
open, fchown, and close rather than just chown.  To do that reliably
(even with an overly restrictive umask), ensure that each
mknod call uses a mode including at least owner-read access.

(main): When `-m MODE' is specified, exit nonzero if
the subsequent chown (or equivalent open,fchown,close) fails.
src/mknod.c