diff options
author | Paul Moore <paul@paul-moore.com> | 2023-02-10 21:20:33 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-03-06 21:41:07 +0300 |
commit | 9348944b775d9a12ee7ab698df5bad85409bdd48 (patch) | |
tree | 5c1be617e04cf5d214e6703b849f53fc83362315 /security | |
parent | 916e32584dfaff068792db70c89936801b476ad0 (diff) | |
download | linux-9348944b775d9a12ee7ab698df5bad85409bdd48.tar.xz |
lsm: move the kernfs hook comments to security/security.c
This patch relocates the LSM hook function comments to the function
definitions, in keeping with the current kernel conventions. This
should make the hook descriptions more easily discoverable and easier
to maintain.
While formatting changes have been done to better fit the kernel-doc
style, content changes have been kept to a minimum and limited to
text which was obviously incorrect and/or outdated. It is expected
the future patches will improve the quality of the function header
comments.
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r-- | security/security.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/security/security.c b/security/security.c index bd35854f956a..b070a24157ec 100644 --- a/security/security.c +++ b/security/security.c @@ -2344,6 +2344,16 @@ int security_inode_copy_up_xattr(const char *name) } EXPORT_SYMBOL(security_inode_copy_up_xattr); +/** + * security_kernfs_init_security() - Init LSM context for a kernfs node + * @kn_dir: parent kernfs node + * @kn: the kernfs node to initialize + * + * Initialize the security context of a newly created kernfs node based on its + * own and its parent's attributes. + * + * Return: Returns 0 if permission is granted. + */ int security_kernfs_init_security(struct kernfs_node *kn_dir, struct kernfs_node *kn) { |