summaryrefslogtreecommitdiffstats
path: root/sysif.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysif.c')
-rw-r--r--sysif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysif.c b/sysif.c
index 4f5da7c5..11c07ce5 100644
--- a/sysif.c
+++ b/sysif.c
@@ -676,7 +676,7 @@ static val chmod_wrap(val target, val mode)
case chm_set:
cmode &= ~mask;
if ((who & CHM_O) != 0)
- bits &= ~S_ISVTX; /* GNU Coreutils 8.28 chmod behavior */
+ cmode &= ~S_ISVTX; /* GNU Coreutils 8.28 chmod behavior */
if (!S_ISDIR(cmode))
cmode &= ~(S_ISUID | S_ISGID);
cmode |= bits;