]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/lsm_hooks.h
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / include / linux / lsm_hooks.h
index 558adfa5c8a87730f0d0177a1def7570e4883596..e29d4c62a3c8e268695d9963c2250f3eaf375399 100644 (file)
  *     Return 0 if permission is granted.
  * @inode_getattr:
  *     Check permission before obtaining file attributes.
- *     @mnt is the vfsmount where the dentry was looked up
- *     @dentry contains the dentry structure for the file.
+ *     @path contains the path structure for the file.
  *     Return 0 if permission is granted.
  * @inode_setxattr:
  *     Check permission before setting the extended attributes
  *     @sig contains the signal value.
  *     @secid contains the sid of the process where the signal originated
  *     Return 0 if permission is granted.
- * @task_wait:
- *     Check permission before allowing a process to reap a child process @p
- *     and collect its status information.
- *     @p contains the task_struct for process.
- *     Return 0 if permission is granted.
  * @task_prctl:
  *     Check permission before performing a process control operation on the
  *     current process.
@@ -1507,7 +1501,6 @@ union security_list_options {
        int (*task_movememory)(struct task_struct *p);
        int (*task_kill)(struct task_struct *p, struct siginfo *info,
                                int sig, u32 secid);
-       int (*task_wait)(struct task_struct *p);
        int (*task_prctl)(int option, unsigned long arg2, unsigned long arg3,
                                unsigned long arg4, unsigned long arg5);
        void (*task_to_inode)(struct task_struct *p, struct inode *inode);
@@ -1547,8 +1540,7 @@ union security_list_options {
        void (*d_instantiate)(struct dentry *dentry, struct inode *inode);
 
        int (*getprocattr)(struct task_struct *p, char *name, char **value);
-       int (*setprocattr)(struct task_struct *p, char *name, void *value,
-                               size_t size);
+       int (*setprocattr)(const char *name, void *value, size_t size);
        int (*ismaclabel)(const char *name);
        int (*secid_to_secctx)(u32 secid, char **secdata, u32 *seclen);
        int (*secctx_to_secid)(const char *secdata, u32 seclen, u32 *secid);
@@ -1768,7 +1760,6 @@ struct security_hook_heads {
        struct list_head task_getscheduler;
        struct list_head task_movememory;
        struct list_head task_kill;
-       struct list_head task_wait;
        struct list_head task_prctl;
        struct list_head task_to_inode;
        struct list_head ipc_permission;
@@ -1876,6 +1867,7 @@ struct security_hook_list {
        struct list_head                list;
        struct list_head                *head;
        union security_list_options     hook;
+       char                            *lsm;
 };
 
 /*
@@ -1888,15 +1880,10 @@ struct security_hook_list {
        { .head = &security_hook_heads.HEAD, .hook = { .HEAD = HOOK } }
 
 extern struct security_hook_heads security_hook_heads;
+extern char *lsm_names;
 
-static inline void security_add_hooks(struct security_hook_list *hooks,
-                                     int count)
-{
-       int i;
-
-       for (i = 0; i < count; i++)
-               list_add_tail_rcu(&hooks[i].list, hooks[i].head);
-}
+extern void security_add_hooks(struct security_hook_list *hooks, int count,
+                               char *lsm);
 
 #ifdef CONFIG_SECURITY_SELINUX_DISABLE
 /*