Merge tag 'lsm-pr-20221212' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm
[platform/kernel/linux-starfive.git] / include / linux / security.h
index 0e419c5..5b67f20 100644 (file)
@@ -362,6 +362,13 @@ int security_inode_getattr(const struct path *path);
 int security_inode_setxattr(struct user_namespace *mnt_userns,
                            struct dentry *dentry, const char *name,
                            const void *value, size_t size, int flags);
+int security_inode_set_acl(struct user_namespace *mnt_userns,
+                          struct dentry *dentry, const char *acl_name,
+                          struct posix_acl *kacl);
+int security_inode_get_acl(struct user_namespace *mnt_userns,
+                          struct dentry *dentry, const char *acl_name);
+int security_inode_remove_acl(struct user_namespace *mnt_userns,
+                             struct dentry *dentry, const char *acl_name);
 void security_inode_post_setxattr(struct dentry *dentry, const char *name,
                                  const void *value, size_t size, int flags);
 int security_inode_getxattr(struct dentry *dentry, const char *name);
@@ -397,6 +404,7 @@ int security_file_send_sigiotask(struct task_struct *tsk,
                                 struct fown_struct *fown, int sig);
 int security_file_receive(struct file *file);
 int security_file_open(struct file *file);
+int security_file_truncate(struct file *file);
 int security_task_alloc(struct task_struct *task, unsigned long clone_flags);
 void security_task_free(struct task_struct *task);
 int security_cred_alloc_blank(struct cred *cred, gfp_t gfp);
@@ -873,6 +881,28 @@ static inline int security_inode_setxattr(struct user_namespace *mnt_userns,
        return cap_inode_setxattr(dentry, name, value, size, flags);
 }
 
+static inline int security_inode_set_acl(struct user_namespace *mnt_userns,
+                                        struct dentry *dentry,
+                                        const char *acl_name,
+                                        struct posix_acl *kacl)
+{
+       return 0;
+}
+
+static inline int security_inode_get_acl(struct user_namespace *mnt_userns,
+                                        struct dentry *dentry,
+                                        const char *acl_name)
+{
+       return 0;
+}
+
+static inline int security_inode_remove_acl(struct user_namespace *mnt_userns,
+                                           struct dentry *dentry,
+                                           const char *acl_name)
+{
+       return 0;
+}
+
 static inline void security_inode_post_setxattr(struct dentry *dentry,
                const char *name, const void *value, size_t size, int flags)
 { }
@@ -1015,6 +1045,11 @@ static inline int security_file_open(struct file *file)
        return 0;
 }
 
+static inline int security_file_truncate(struct file *file)
+{
+       return 0;
+}
+
 static inline int security_task_alloc(struct task_struct *task,
                                      unsigned long clone_flags)
 {