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

Commit 857013b8 authored by David Woodhouse's avatar David Woodhouse
Browse files

[JFFS2] Don't strip sgid bit from inode permissions



<viro> dwmw2: anyway, removing sgid from directories or from
       files without S_IXGRP is a plain and simple bug
<viro> these days you don't need that logics at all - simply remove it

Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
parent 15953580
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -97,10 +97,6 @@ int jffs2_do_setattr (struct inode *inode, struct iattr *iattr)
	ri->gid = cpu_to_je16((ivalid & ATTR_GID)?iattr->ia_gid:inode->i_gid);

	if (ivalid & ATTR_MODE)
		if (iattr->ia_mode & S_ISGID &&
		    !in_group_p(je16_to_cpu(ri->gid)) && !capable(CAP_FSETID))
			ri->mode = cpu_to_jemode(iattr->ia_mode & ~S_ISGID);
		else
		ri->mode = cpu_to_jemode(iattr->ia_mode);
	else
		ri->mode = cpu_to_jemode(inode->i_mode);