diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-07-03 17:10:19 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-07-05 12:36:36 -0700 |
commit | 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 (patch) | |
tree | 380bffd5014564f906357aaf5255e81b7c466353 /include | |
parent | d02d21ea007b6b33cdaf15c2f84fb1fea996ecc2 (diff) |
Fix up non-directory creation in SGID directories
sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid. This is historically used for
group-shared directories.
But group directories writable by non-group members should not imply
that such non-group members can magically join the group, so make sure
to clear the sgid bit on non-directories for non-members (but remember
that sgid without group execute means "mandatory locking", just to
confuse things even more).
Reported-by: Jann Horn <jannh@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions