summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index d695f6200e1..cd6fa11bb3f 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -509,7 +509,8 @@ posix_acl_inherit_mode (struct posix_acl *acl, mode_t modein)
mode &= (group_ce->perm << 3) | ~S_IRWXG;
}
- newmode = ((modein & S_IFMT) | (mode & (S_IRWXU|S_IRWXG|S_IRWXO)));
+ newmode = ((modein & (S_IFMT | S_ISUID | S_ISGID | S_ISVTX)) |
+ (mode & (S_IRWXU|S_IRWXG|S_IRWXO)));
return newmode;
}