mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00:00
userns: Convert btrfs to use kuid/kgid where appropriate
Cc: Chris Mason <chris.mason@fusionio.com> Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
This commit is contained in:
parent
7f5b82b835
commit
2f2f43d3c7
4 changed files with 11 additions and 12 deletions
|
@ -575,13 +575,13 @@ fail:
|
|||
*/
|
||||
static inline int btrfs_check_sticky(struct inode *dir, struct inode *inode)
|
||||
{
|
||||
uid_t fsuid = current_fsuid();
|
||||
kuid_t fsuid = current_fsuid();
|
||||
|
||||
if (!(dir->i_mode & S_ISVTX))
|
||||
return 0;
|
||||
if (inode->i_uid == fsuid)
|
||||
if (uid_eq(inode->i_uid, fsuid))
|
||||
return 0;
|
||||
if (dir->i_uid == fsuid)
|
||||
if (uid_eq(dir->i_uid, fsuid))
|
||||
return 0;
|
||||
return !capable(CAP_FOWNER);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue