LSM: Document the d_instantiate LSM hook
diff mbox

Message ID 20170217083857.14207-1-laurent.georget@supelec.fr
State New
Headers show

Commit Message

Laurent Georget Feb. 17, 2017, 8:38 a.m. UTC
Signed-off-by: Laurent Georget <laurent.georget@supelec.fr>
---
Hi everybody,

this is a simple documentation patch for lsm_hooks.h to add a comment about
the d_instantiate hook.

I also noted that sb_kern_mount has no documentation despite an e-mail on the
topic back in 2004 (http://lists.jammed.com/linux-security-module/2004/01/0011.html).
Is that normal?

Cheers,

Laurent Georget

 include/linux/lsm_hooks.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch
diff mbox

diff --git a/include/linux/lsm_hooks.h b/include/linux/lsm_hooks.h
index 558adfa5c8a8..d8900f758461 100644
--- a/include/linux/lsm_hooks.h
+++ b/include/linux/lsm_hooks.h
@@ -162,7 +162,6 @@ 
  *	@old creds which should be used for context calculation
  *	@new creds to modify
  *
- *
  * Security hooks for inode operations.
  *
  * @inode_alloc_security:
@@ -428,6 +427,11 @@ 
  *	security module does not know about attribute or a negative error code
  *	to abort the copy up. Note that the caller is responsible for reading
  *	and writing the xattrs as this hook is merely a filter.
+ * @d_instantiate:
+ *	Populate the security structure of a dentry or its backing inode as
+ *	that dentry is installed in the dentry cache.
+ *	@dentry contains a pointer to the new dentry.
+ *	@inode contains a pointer to the inode backing the dentry. May be NULL.
  *
  * Security hooks for file operations
  *