Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse

Pull fuse fix from Miklos Szeredi:
"Fix a regression spotted by Jeff Layton"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
fuse: fix clearing suid, sgid for chown()

+2 -5
+2 -5
fs/fuse/dir.c
··· 1739 1739 * This should be done on write(), truncate() and chown(). 1740 1740 */ 1741 1741 if (!fc->handle_killpriv) { 1742 - int kill; 1743 - 1744 1742 /* 1745 1743 * ia_mode calculation may have used stale i_mode. 1746 1744 * Refresh and recalculate. ··· 1748 1750 return ret; 1749 1751 1750 1752 attr->ia_mode = inode->i_mode; 1751 - kill = should_remove_suid(entry); 1752 - if (kill & ATTR_KILL_SUID) { 1753 + if (inode->i_mode & S_ISUID) { 1753 1754 attr->ia_valid |= ATTR_MODE; 1754 1755 attr->ia_mode &= ~S_ISUID; 1755 1756 } 1756 - if (kill & ATTR_KILL_SGID) { 1757 + if ((inode->i_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) { 1757 1758 attr->ia_valid |= ATTR_MODE; 1758 1759 attr->ia_mode &= ~S_ISGID; 1759 1760 }