[BusyBox] Another bug(?) in cp
Matt Kraai
kraai at alumni.carnegiemellon.edu
Mon Apr 30 08:27:03 UTC 2001
On Sat, Apr 28, 2001 at 08:56:57AM -0700, Brian Webb wrote:
> I'm not sure if this is a bug, but it works different than on my
> desktop,so I think it is. The problem is that "cp -a" uses the umask when
> copying devide files, so "cp -a" does not preserve complete file
> permissions. I'm not sure exactly how it should work, but on my desktop I
> can copy my /dev directory with "cp -a" and all permissions are preserved.
> Also it seems reasonable for "cp -a" or "cp -p" to work that way.
>
> The following is a patch that fixes the problem (at least it works for
> me). It looks a little different than the other, similar code around it,
> but it seems to me like it should be correct.
Could you give an example of the failure that you are seeing?
There should be code at the end of copy_file that sets the
permissions correctly if -a or -p is specified.
Matt
More information about the busybox
mailing list