Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Oct 1996 22:54:58 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@freefall.freebsd.org, zach@blizzard.gaffaneys.com
Subject:   Re: bin/1377
Message-ID:  <199610231254.WAA03226@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610231254.WAA03226>