> So it seems that the cp(1) manpage got it right, if the file exists > preserve > mode, if the file doesn't exist apply the umask. In the case of the '-p' > option > preserve setuid and setgid bits if UID and GID can be preserved. If I'm > right > it's a binary mismatch. > > Hope this helps. > -Jesus >
Looking others *BSDs in NetBSD noticed this and made the change. You can see in revision 1.33 of utils.c ( http://cvsweb.netbsd.org/bsdweb.cgi/src/bin/cp/utils.c?only_with_tag=MAIN) in case you think it's OK to make the patch their diff version it's much better than mine. The NetBSD change matches POSIX. Regards. -Jesus
