]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: add security label to struct nfsd_attrs
authorNeilBrown <neilb@suse.de>
Tue, 26 Jul 2022 06:45:30 +0000 (16:45 +1000)
committerChuck Lever <chuck.lever@oracle.com>
Sat, 30 Jul 2022 00:17:00 +0000 (20:17 -0400)
commit848e677731070527fb5d6a9a2ee9d99e2b8f9f02
treef8aff91be21250a2dac3ef53603dc6c52ca5fdb9
parent8def011088d84c0148b7fd2ffa4de96f4b6e8810
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>
fs/nfsd/nfs4proc.c
fs/nfsd/vfs.c
fs/nfsd/vfs.h