diff options
author | NeilBrown <neilb@suse.de> | 2022-07-26 16:45:30 +1000 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-07-29 20:17:00 -0400 |
commit | d6a97d3f589a3a46a16183e03f3774daee251317 (patch) | |
tree | f8aff91be21250a2dac3ef53603dc6c52ca5fdb9 /fs/nfsd/vfs.h | |
parent | 93adc1e391a761441d783828b93979b38093d011 (diff) |
NFSD: add security label to struct nfsd_attrs
nfsd_setattr() now sets a security label if provided, and nfsv4 provides
it in the 'open' and 'create' paths and the 'setattr' path.
If setting the label failed (including because the kernel doesn't
support labels), an error field in 'struct nfsd_attrs' is set, and the
caller can respond. The open/create callers clear
FATTR4_WORD2_SECURITY_LABEL in the returned attr set in this case.
The setattr caller returns the error.
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/vfs.h')
-rw-r--r-- | fs/nfsd/vfs.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h index 5047cec4c423..d5d4cfe37c93 100644 --- a/fs/nfsd/vfs.h +++ b/fs/nfsd/vfs.h @@ -44,6 +44,9 @@ typedef int (*nfsd_filldir_t)(void *, const char *, int, loff_t, u64, unsigned); /* nfsd/vfs.c */ struct nfsd_attrs { struct iattr *na_iattr; /* input */ + struct xdr_netobj *na_seclabel; /* input */ + + int na_labelerr; /* output */ }; int nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp, @@ -57,8 +60,6 @@ __be32 nfsd_setattr(struct svc_rqst *, struct svc_fh *, struct nfsd_attrs *, int, time64_t); int nfsd_mountpoint(struct dentry *, struct svc_export *); #ifdef CONFIG_NFSD_V4 -__be32 nfsd4_set_nfs4_label(struct svc_rqst *, struct svc_fh *, - struct xdr_netobj *); __be32 nfsd4_vfs_fallocate(struct svc_rqst *, struct svc_fh *, struct file *, loff_t, loff_t, int); __be32 nfsd4_clone_file_range(struct svc_rqst *rqstp, |