diff options
-rw-r--r-- | sysif.c | 1 | ||||
-rw-r--r-- | tests/018/chmod.tl | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -673,6 +673,7 @@ static val chmod_wrap(val target, val mode) case chm_sub: cmode &= ~bits; break; case chm_set: if (cs == chm_perm) { + oldm = cmode; cmode &= ~mask; if (implicit_all || (who & CHM_O) != 0) cmode &= ~S_ISVTX; /* GNU Coreutils 8.28 chmod behavior */ diff --git a/tests/018/chmod.tl b/tests/018/chmod.tl index 93739c48..8cde28eb 100644 --- a/tests/018/chmod.tl +++ b/tests/018/chmod.tl @@ -46,3 +46,4 @@ (cht "-----x------" "=,a+X" "------------") (cht "-----x------" "a-x+X" "------------") (cht "------------" "u+x-X" "------------") +(cht "------------" "o+x=o" "-----------x") |