bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] cp, mv: do preserve extended attributes even for read-only s


From: Jim Meyering
Subject: Re: [PATCH] cp, mv: do preserve extended attributes even for read-only source files
Date: Tue, 15 Sep 2009 09:32:29 +0200

Ondřej Vašík wrote:

> Jim Meyering wrote:
>> Ondřej Vašík wrote:
>> > Pádraig Brady wrote:
>> >> Yes I agree that the change is required.
>> >> I've tweaked it so that the geteuid() syscall is only called
>> >> if readonly files. Also I removed the error message on chmod failure
>> >> as the user will still get an error message _if_ the copy_xattr fails.
>> >> Also I ran it through indent and did s/write access rights/write access/.
>> >> I'll push it soon if there are no objections.
>> >
>> > Thanks for word tweaks and other patch-amending. I spotted one error -
>> > initial value of access_changed was not changed to false when you
>> > changed the name and logic from access_unchanged (fixed by attached
>> > patch).
>>
>> Thanks, Ondřej!
>> Can you contrive a test that would expose that?
>
> I'm not sure if this is useful - as this boolean is just saving chmod
> call for the case, that the chmod was not necessary. So even the
> Pádraig's patch works, but for files with write access there is one
> unnecessary chmod call. Adding test would probably mean strace usage, so
> if such test is really required, I would prefer to have that test
> separate.

Indeed.  Testing for an excess chmod call would not be worthwhile.
Thanks.




reply via email to

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