Hello people!
This is path for strange behavior:
rm -rf chmodbug;
mkdir chmodbug;
chmod 2755 chmodbug;
stat --print "%a %n\n" chmodbug;
chmod 0755 chmodbug;
stat --print "%a %n\n" chmodbug;
This path (in attach too):
--- a/lib/modechange.c
+++ b/lib/modechange.c
@@ -355,7 +355,10 @@ mode_adjust (mode_t oldmode, bool dir, mode_t umask_value,
switch (changes->flag)
{
case MODE_ORDINARY_CHANGE:
- break;
+ {
+ omit_change = 0;
+ break;
+ }
.
case MODE_COPY_EXISTING:
/* Isolate in 'value' the bits in 'newmode' to copy. */