diff options
author | Christian Brauner <brauner@kernel.org> | 2022-10-18 10:13:47 +0200 |
---|---|---|
committer | Christian Brauner (Microsoft) <brauner@kernel.org> | 2022-10-18 10:13:47 +0200 |
commit | b4dd412d4a6231de100ae8ce2a9e1ed649f9e748 (patch) | |
tree | 0f6c78c0bbc33fd39541976939755919f3d3bb56 /fs/internal.h | |
parent | 9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff) | |
parent | 23a8ce16419a3066829ad4a8b7032a75817af65b (diff) | |
download | linux-stable-b4dd412d4a6231de100ae8ce2a9e1ed649f9e748.tar.gz linux-stable-b4dd412d4a6231de100ae8ce2a9e1ed649f9e748.tar.bz2 linux-stable-b4dd412d4a6231de100ae8ce2a9e1ed649f9e748.zip |
Merge branch 'fs.ovl.setgid' into for-next
* fs.ovl.setgid:
ovl: remove privs in ovl_fallocate()
ovl: remove privs in ovl_copyfile()
attr: use consistent sgid stripping checks
attr: add setattr_should_drop_sgid()
fs: move should_remove_suid()
attr: add in_group_or_capable()
Diffstat (limited to 'fs/internal.h')
-rw-r--r-- | fs/internal.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/internal.h b/fs/internal.h index 6f0386b34fae..5545c26d86ae 100644 --- a/fs/internal.h +++ b/fs/internal.h @@ -150,7 +150,9 @@ extern int vfs_open(const struct path *, struct file *); * inode.c */ extern long prune_icache_sb(struct super_block *sb, struct shrink_control *sc); -extern int dentry_needs_remove_privs(struct dentry *dentry); +int dentry_needs_remove_privs(struct user_namespace *, struct dentry *dentry); +bool in_group_or_capable(struct user_namespace *mnt_userns, + const struct inode *inode, vfsgid_t vfsgid); /* * fs-writeback.c @@ -234,3 +236,9 @@ int do_setxattr(struct user_namespace *mnt_userns, struct dentry *dentry, struct xattr_ctx *ctx); ssize_t __kernel_write_iter(struct file *file, struct iov_iter *from, loff_t *pos); + +/* + * fs/attr.c + */ +int setattr_should_drop_sgid(struct user_namespace *mnt_userns, + const struct inode *inode); |