From owner-freebsd-bugs Wed Oct 23 06:02:24 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA15659 for bugs-outgoing; Wed, 23 Oct 1996 06:02:24 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA15653 for ; Wed, 23 Oct 1996 06:02:20 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.7.6/8.6.9) id WAA03226; Wed, 23 Oct 1996 22:54:58 +1000 Date: Wed, 23 Oct 1996 22:54:58 +1000 From: Bruce Evans Message-Id: <199610231254.WAA03226@godzilla.zeta.org.au> To: freebsd-bugs@freefall.freebsd.org, zach@blizzard.gaffaneys.com Subject: Re: bin/1377 Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> Synopsis: mv(1) retains the setuid bit when it is unable to preserve the uid. > >Here is a patch that updates the fastcopy() routine in mv(1) to >conform to the method cp(1) uses for handling setuid/setgid bits when >the uid and gid cannot be preserved. It seems about right. I think it should avoid the magic number 01777 as in cp. >Note that the actual behavior of >cp -p does NOT match the man page (more on this later). Note that mv across doesn't preserve the flags or nanoseconds field in the timestamps. `cp -p' preserves the flags if possible and rounds the nanonseconds field in the timestamps to the nearest microsecond (it can't do better since there is no way to set the nanoseconds field, and current file systems round to seconds or microseconds anyway). mv should be more careful to preserve things than `cp -p' Bruce