GNU bug report logs - #50791
Recursive chmod exit status in coreutils-9.0

Previous Next

Package: coreutils;

Reported by: Chris Webb <chris <at> arachsys.com>

Date: Fri, 24 Sep 2021 22:26:01 UTC

Severity: normal

Merged with 50784, 53262

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pádraig Brady <P <at> draigBrady.com>
To: Chris Webb <chris <at> arachsys.com>
Cc: 50791 <at> debbugs.gnu.org
Subject: bug#50791: Recursive chmod exit status in coreutils-9.0
Date: Sat, 25 Sep 2021 11:49:06 +0100
On 25/09/2021 07:07, Chris Webb wrote:
>> Thanks for the analysis and patch.
>> I've already pushed a very similar patch at:
>> https://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=e8b56ebd5
> 
> Many thanks!
> 
> With the above fix, do we also need something like
> 
> @@ -300,7 +300,7 @@ process_file (FTS *fts, FTSENT *ent)
>           describe_change (file_full_name, &ch);
>       }
>   
> -  if (CH_NO_CHANGE_REQUESTED <= ch.status && diagnose_surprises)
> +  if (CH_NOT_APPLIED <= ch.status && diagnose_surprises)
>       {
>         mode_t naively_expected_mode =
>           mode_adjust (ch.old_mode, S_ISDIR (ch.old_mode) != 0, 0, change, NULL);
> 
> in the diagnose_surprises stanza, to avoid checking every symlink we skip for
> unexpected permissions?


CH_NOT_APPLIED is smaller than CH_NO_CHANGE_REQUESTED
in the current enum ordering, so we skip this
block as expected for the ignored symlink case.

cheers,
Pádraig




This bug report was last modified 3 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.