introduce cloning of fs_context
[linux-block.git] / include / linux / lsm_hooks.h
index 47ba4db4d8fbb557b3ea698627eb67ed2ce1c24c..356e78fe90a8358e635579c4027d0952051e2f88 100644 (file)
  * Security hooks for mount using fs_context.
  *     [See also Documentation/filesystems/mounting.txt]
  *
+ * @fs_context_dup:
+ *     Allocate and attach a security structure to sc->security.  This pointer
+ *     is initialised to NULL by the caller.
+ *     @fc indicates the new filesystem context.
+ *     @src_fc indicates the original filesystem context.
  * @fs_context_parse_param:
  *     Userspace provided a parameter to configure a superblock.  The LSM may
  *     reject it with an error and may use it for itself, in which case it
@@ -1470,6 +1475,7 @@ union security_list_options {
        void (*bprm_committing_creds)(struct linux_binprm *bprm);
        void (*bprm_committed_creds)(struct linux_binprm *bprm);
 
+       int (*fs_context_dup)(struct fs_context *fc, struct fs_context *src_sc);
        int (*fs_context_parse_param)(struct fs_context *fc, struct fs_parameter *param);
 
        int (*sb_alloc_security)(struct super_block *sb);
@@ -1813,6 +1819,7 @@ struct security_hook_heads {
        struct hlist_head bprm_check_security;
        struct hlist_head bprm_committing_creds;
        struct hlist_head bprm_committed_creds;
+       struct hlist_head fs_context_dup;
        struct hlist_head fs_context_parse_param;
        struct hlist_head sb_alloc_security;
        struct hlist_head sb_free_security;