coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cp preserves mode with --no-preserve=mode


From: Jim Meyering
Subject: Re: cp preserves mode with --no-preserve=mode
Date: Tue, 07 Aug 2012 11:18:21 +0200

Ondrej Oprala wrote:
> Hi, I'd like to propose a fix for a bug mentioned in the redhat bugzilla:
> https://bugzilla.redhat.com/show_bug.cgi?id=755508
> The patch adds another boolean instead of a proposed tristate, thus not
> upsetting any existing code.

Hi Ondřej,

Thanks for working on this.
Your approach seems fine.

However, any new cp_options member must be initialized also in mv.c
and install.c.  Otherwise, it would be used uninitialized.

Also, please add a test in a new file just for this change.
That test should fail before your change and succeed with patched cp.

Finally, also adjust your commit to remove this entry from TODO:

    cp --no-preserve=X should not attempt to preserve attribute X
      reported by Andreas Schwab

> Also, if the behaviour proposed in the bugzilla entry when
> --no-preserve=mode option
> is specified is correct, I think the last test in cp/link-preserve
> should be changed.
> Shouldn't the --no-preserve=mode always create permissions of 0666 &
> ~umask? The test
> seems to assume that a 0777 & ~umask mode should be set.

I'll look at this part later.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]