mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-05 00:35:13 +00:00
91 lines
2.8 KiB
Diff
91 lines
2.8 KiB
Diff
Add a struct vfsmount parameter to vfs_removexattr()
|
|
|
|
Signed-off-by: Tony Jones <tonyj@suse.de>
|
|
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
|
|
|
Index: b/fs/nfsd/vfs.c
|
|
===================================================================
|
|
--- a/fs/nfsd/vfs.c
|
|
+++ b/fs/nfsd/vfs.c
|
|
@@ -1989,7 +1989,8 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
|
if (!S_ISDIR(inode->i_mode) && type == ACL_TYPE_DEFAULT)
|
|
error = 0;
|
|
else {
|
|
- error = vfs_removexattr(fhp->fh_dentry, name);
|
|
+ error = vfs_removexattr(fhp->fh_dentry,
|
|
+ fhp->fh_export->ex_mnt, name);
|
|
if (error == -ENODATA)
|
|
error = 0;
|
|
}
|
|
Index: b/fs/xattr.c
|
|
===================================================================
|
|
--- a/fs/xattr.c
|
|
+++ b/fs/xattr.c
|
|
@@ -166,7 +166,7 @@ vfs_listxattr(struct dentry *dentry, str
|
|
EXPORT_SYMBOL_GPL(vfs_listxattr);
|
|
|
|
int
|
|
-vfs_removexattr(struct dentry *dentry, char *name)
|
|
+vfs_removexattr(struct dentry *dentry, struct vfsmount *mnt, char *name)
|
|
{
|
|
struct inode *inode = dentry->d_inode;
|
|
int error;
|
|
@@ -437,7 +437,7 @@ sys_flistxattr(int fd, char __user *list
|
|
* Extended attribute REMOVE operations
|
|
*/
|
|
static long
|
|
-removexattr(struct dentry *d, char __user *name)
|
|
+removexattr(struct dentry *dentry, struct vfsmount *mnt, char __user *name)
|
|
{
|
|
int error;
|
|
char kname[XATTR_NAME_MAX + 1];
|
|
@@ -448,7 +448,7 @@ removexattr(struct dentry *d, char __use
|
|
if (error < 0)
|
|
return error;
|
|
|
|
- return vfs_removexattr(d, kname);
|
|
+ return vfs_removexattr(dentry, mnt, kname);
|
|
}
|
|
|
|
asmlinkage long
|
|
@@ -460,7 +460,7 @@ sys_removexattr(char __user *path, char
|
|
error = user_path_walk(path, &nd);
|
|
if (error)
|
|
return error;
|
|
- error = removexattr(nd.dentry, name);
|
|
+ error = removexattr(nd.dentry, nd.mnt, name);
|
|
path_release(&nd);
|
|
return error;
|
|
}
|
|
@@ -474,7 +474,7 @@ sys_lremovexattr(char __user *path, char
|
|
error = user_path_walk_link(path, &nd);
|
|
if (error)
|
|
return error;
|
|
- error = removexattr(nd.dentry, name);
|
|
+ error = removexattr(nd.dentry, nd.mnt, name);
|
|
path_release(&nd);
|
|
return error;
|
|
}
|
|
@@ -491,7 +491,7 @@ sys_fremovexattr(int fd, char __user *na
|
|
return error;
|
|
dentry = f->f_path.dentry;
|
|
audit_inode(NULL, dentry->d_inode);
|
|
- error = removexattr(dentry, name);
|
|
+ error = removexattr(dentry, f->f_path.mnt, name);
|
|
fput(f);
|
|
return error;
|
|
}
|
|
Index: b/include/linux/xattr.h
|
|
===================================================================
|
|
--- a/include/linux/xattr.h
|
|
+++ b/include/linux/xattr.h
|
|
@@ -52,7 +52,7 @@ ssize_t vfs_listxattr(struct dentry *d,
|
|
size_t size);
|
|
int vfs_setxattr(struct dentry *, struct vfsmount *, char *, void *, size_t,
|
|
int);
|
|
-int vfs_removexattr(struct dentry *, char *);
|
|
+int vfs_removexattr(struct dentry *, struct vfsmount *, char *);
|
|
|
|
ssize_t generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size);
|
|
ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size);
|