author | Ao Xu <ao.xu@amlogic.com> | 2018-08-10 06:14:25 (GMT) |
---|---|---|
committer | Tellen Yu <tellen.yu@amlogic.com> | 2018-08-15 10:32:25 (GMT) |
commit | 9f79e3d6c827449dcfde8e93ef1586449945d24a (patch) | |
tree | 5fed7e834f37707b2c3076ea0738f21ccaf51d57 | |
parent | 7ac5a0503ee83b258f89a57c4baab34cdcd58a8f (diff) | |
download | common-ampere-20180815.zip common-ampere-20180815.tar.gz common-ampere-20180815.tar.bz2 |
Revert "Fix up non-directory creation in SGID directories"
This reverts commit d2c7c52431819aa05d76fae77bb3f95dd0955da1.
Change-Id: I096cd7fd49ccad4bd032bb365211930fa1aa74d4
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
-rw-r--r-- | fs/inode.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -2003,14 +2003,8 @@ void inode_init_owner(struct inode *inode, const struct inode *dir, inode->i_uid = current_fsuid(); if (dir && dir->i_mode & S_ISGID) { inode->i_gid = dir->i_gid; - - /* Directories are special, and always inherit S_ISGID */ if (S_ISDIR(mode)) mode |= S_ISGID; - else if ((mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP) && - !in_group_p(inode->i_gid) && - !capable_wrt_inode_uidgid(dir, CAP_FSETID)) - mode &= ~S_ISGID; } else inode->i_gid = current_fsgid(); inode->i_mode = mode; |