* fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 18 Jul 2011 17:21:18 +0000 (10:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 18 Jul 2011 17:21:18 +0000 (10:21 -0700)
commitb59b67c56e338162437c045a8a0e2156bcde9a0b
treeca1307f544e189aa8c1125d353aaf76c2a038559
parentbf2c1571f4085d3b52f37370f0bcdf7a23c53a50
* fileio.c (Fcopy_file): Adjust mode if fchown fails.  (Bug#9002)

If fchown fails to set both uid and gid, try to set just gid,
as that is sometimes allowed.  Adjust the file's mode to eliminate
setuid or setgid bits that are inappropriate if fchown fails.
src/ChangeLog
src/fileio.c