author | Jie Yuan <jie.yuan@amlogic.com> | 2018-08-10 06:14:25 (GMT) |
---|---|---|
committer | jie.yuan <jie.yuan@amlogic.com> | 2018-08-14 10:27:51 (GMT) |
commit | ea0ab54e12dfc7e40b7a1634ebb364f22f80c1b1 (patch) | |
tree | df11da9ba392e62c3683d9470c444ec8c686dad9 | |
parent | 01b400cc092011ee921270f1742fca41bb7d9bba (diff) | |
download | common-ea0ab54e12dfc7e40b7a1634ebb364f22f80c1b1.zip common-ea0ab54e12dfc7e40b7a1634ebb364f22f80c1b1.tar.gz common-ea0ab54e12dfc7e40b7a1634ebb364f22f80c1b1.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; |