mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
security: Fix ret values doc for security_inode_init_security()
Commit6bcdfd2cac
("security: Allow all LSMs to provide xattrs for inode_init_security hook") unified the !initxattrs and initxattrs cases. By doing that, security_inode_init_security() cannot return -EOPNOTSUPP anymore, as it is always replaced with zero at the end of the function. Also, mentioning -ENOMEM as the only possible error is not correct. For example, evm_inode_init_security() could return -ENOKEY. Fix these issues in the documentation of security_inode_init_security(). Fixes:6bcdfd2cac
("security: Allow all LSMs to provide xattrs for inode_init_security hook") Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
ca22eca6e2
commit
faf302f5a2
@ -1604,8 +1604,8 @@ EXPORT_SYMBOL(security_dentry_create_files_as);
|
||||
* a security attribute on this particular inode, then it should return
|
||||
* -EOPNOTSUPP to skip this processing.
|
||||
*
|
||||
* Return: Returns 0 on success, -EOPNOTSUPP if no security attribute is
|
||||
* needed, or -ENOMEM on memory allocation failure.
|
||||
* Return: Returns 0 if the LSM successfully initialized all of the inode
|
||||
* security attributes that are required, negative values otherwise.
|
||||
*/
|
||||
int security_inode_init_security(struct inode *inode, struct inode *dir,
|
||||
const struct qstr *qstr,
|
||||
|
Loading…
Reference in New Issue
Block a user