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 8648485cf79..3a8325660f6 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -512,7 +512,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;
}