mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
vfs: move cap_convert_nscap() call into vfs_setxattr()
cap_convert_nscap() does permission checking as well as conversion of the xattr value conditionally based on fs's user-ns. This is needed by overlayfs and probably other layered fs (ecryptfs) and is what vfs_foo() is supposed to do anyway. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Acked-by: James Morris <jamorris@linux.microsoft.com>
This commit is contained in:
@@ -270,6 +270,6 @@ static inline bool checkpoint_restore_ns_capable(struct user_namespace *ns)
|
||||
/* audit system wants to get cap info from files as well */
|
||||
extern int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps);
|
||||
|
||||
extern int cap_convert_nscap(struct dentry *dentry, void **ivalue, size_t size);
|
||||
extern int cap_convert_nscap(struct dentry *dentry, const void **ivalue, size_t size);
|
||||
|
||||
#endif /* !_LINUX_CAPABILITY_H */
|
||||
|
||||
Reference in New Issue
Block a user