Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9591eb26 authored by Linus Torvalds's avatar Linus Torvalds Committed by Srinivasa Rao Kuppala
Browse files

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: default avatarJann Horn <jannh@google.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Git-repo: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git


Git-commit: 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7
Signed-off-by: default avatarSrinivasa Rao Kuppala <srkupp@codeaurora.org>
Change-Id: Ia3848ad06288a0270432ea67018c98cce34de02f
parent 32065867
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment