fs/vfs/security: pass last path component to LSM on inode creation
[deliverable/linux.git] / include / linux / security.h
index c642bb8b8f5a4894b3878a0977a017b684efefe4..05dd5a64aa762c6126e4f9313a1f4965137d455d 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/fs.h>
 #include <linux/fsnotify.h>
 #include <linux/binfmts.h>
+#include <linux/dcache.h>
 #include <linux/signal.h>
 #include <linux/resource.h>
 #include <linux/sem.h>
@@ -315,6 +316,7 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts)
  *     then it should return -EOPNOTSUPP to skip this processing.
  *     @inode contains the inode structure of the newly created inode.
  *     @dir contains the inode structure of the parent directory.
+ *     @qstr contains the last path component of the new object
  *     @name will be set to the allocated name suffix (e.g. selinux).
  *     @value will be set to the allocated attribute value.
  *     @len will be set to the length of the value.
@@ -1435,7 +1437,8 @@ struct security_operations {
        int (*inode_alloc_security) (struct inode *inode);
        void (*inode_free_security) (struct inode *inode);
        int (*inode_init_security) (struct inode *inode, struct inode *dir,
-                                   char **name, void **value, size_t *len);
+                                   const struct qstr *qstr, char **name,
+                                   void **value, size_t *len);
        int (*inode_create) (struct inode *dir,
                             struct dentry *dentry, int mode);
        int (*inode_link) (struct dentry *old_dentry,
@@ -1696,7 +1699,8 @@ int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts);
 int security_inode_alloc(struct inode *inode);
 void security_inode_free(struct inode *inode);
 int security_inode_init_security(struct inode *inode, struct inode *dir,
-                                 char **name, void **value, size_t *len);
+                                const struct qstr *qstr, char **name,
+                                void **value, size_t *len);
 int security_inode_create(struct inode *dir, struct dentry *dentry, int mode);
 int security_inode_link(struct dentry *old_dentry, struct inode *dir,
                         struct dentry *new_dentry);
@@ -2023,6 +2027,7 @@ static inline void security_inode_free(struct inode *inode)
 
 static inline int security_inode_init_security(struct inode *inode,
                                                struct inode *dir,
+                                               const struct qstr *qstr,
                                                char **name,
                                                void **value,
                                                size_t *len)
This page took 0.030198 seconds and 5 git commands to generate.