mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-01 23:05:11 +00:00
Make nfsd compile again after file-handle-ops-2.diff.
This commit is contained in:
@@ -312,3 +312,51 @@ Index: b/security/apparmor/apparmor.h
|
|||||||
extern int aa_perm_dir(struct aa_profile *profile, struct dentry *dentry,
|
extern int aa_perm_dir(struct aa_profile *profile, struct dentry *dentry,
|
||||||
struct vfsmount *mnt, const char *operation, int mask);
|
struct vfsmount *mnt, const char *operation, int mask);
|
||||||
extern int aa_link(struct aa_profile *profile,
|
extern int aa_link(struct aa_profile *profile,
|
||||||
|
Index: b/fs/nfsd/vfs.c
|
||||||
|
===================================================================
|
||||||
|
--- a/fs/nfsd/vfs.c
|
||||||
|
+++ b/fs/nfsd/vfs.c
|
||||||
|
@@ -383,7 +383,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||||
|
{
|
||||||
|
ssize_t buflen;
|
||||||
|
|
||||||
|
- buflen = vfs_getxattr(dentry, mnt, key, NULL, 0);
|
||||||
|
+ buflen = vfs_getxattr(dentry, mnt, key, NULL, 0, NULL);
|
||||||
|
if (buflen <= 0)
|
||||||
|
return buflen;
|
||||||
|
|
||||||
|
@@ -391,7 +391,7 @@ static ssize_t nfsd_getxattr(struct dent
|
||||||
|
if (!*buf)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
- return vfs_getxattr(dentry, mnt, key, *buf, buflen);
|
||||||
|
+ return vfs_getxattr(dentry, mnt, key, *buf, buflen, NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -417,7 +417,7 @@ set_nfsv4_acl_one(struct dentry *dentry,
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
- error = vfs_setxattr(dentry, mnt, key, buf, len, 0);
|
||||||
|
+ error = vfs_setxattr(dentry, mnt, key, buf, len, 0, NULL);
|
||||||
|
out:
|
||||||
|
kfree(buf);
|
||||||
|
return error;
|
||||||
|
@@ -1984,13 +1984,14 @@ nfsd_set_posix_acl(struct svc_fh *fhp, i
|
||||||
|
|
||||||
|
if (size)
|
||||||
|
error = vfs_setxattr(fhp->fh_dentry, fhp->fh_export->ex_mnt,
|
||||||
|
- name, value, size,0);
|
||||||
|
+ name, value, size, 0, NULL);
|
||||||
|
else {
|
||||||
|
if (!S_ISDIR(inode->i_mode) && type == ACL_TYPE_DEFAULT)
|
||||||
|
error = 0;
|
||||||
|
else {
|
||||||
|
error = vfs_removexattr(fhp->fh_dentry,
|
||||||
|
- fhp->fh_export->ex_mnt, name);
|
||||||
|
+ fhp->fh_export->ex_mnt, name,
|
||||||
|
+ NULL);
|
||||||
|
if (error == -ENODATA)
|
||||||
|
error = 0;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user