~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/evm.h

Version: ~ [ linux-5.2-rc5 ] ~ [ linux-5.1.12 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.53 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.128 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.182 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.182 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.68 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * evm.h
  3  *
  4  * Copyright (c) 2009 IBM Corporation
  5  * Author: Mimi Zohar <zohar@us.ibm.com>
  6  */
  7 
  8 #ifndef _LINUX_EVM_H
  9 #define _LINUX_EVM_H
 10 
 11 #include <linux/integrity.h>
 12 #include <linux/xattr.h>
 13 
 14 struct integrity_iint_cache;
 15 
 16 #ifdef CONFIG_EVM
 17 extern enum integrity_status evm_verifyxattr(struct dentry *dentry,
 18                                              const char *xattr_name,
 19                                              void *xattr_value,
 20                                              size_t xattr_value_len,
 21                                              struct integrity_iint_cache *iint);
 22 extern int evm_inode_setattr(struct dentry *dentry, struct iattr *attr);
 23 extern void evm_inode_post_setattr(struct dentry *dentry, int ia_valid);
 24 extern int evm_inode_setxattr(struct dentry *dentry, const char *name,
 25                               const void *value, size_t size);
 26 extern void evm_inode_post_setxattr(struct dentry *dentry,
 27                                     const char *xattr_name,
 28                                     const void *xattr_value,
 29                                     size_t xattr_value_len);
 30 extern int evm_inode_removexattr(struct dentry *dentry, const char *xattr_name);
 31 extern void evm_inode_post_removexattr(struct dentry *dentry,
 32                                        const char *xattr_name);
 33 extern int evm_inode_init_security(struct inode *inode,
 34                                    const struct xattr *xattr_array,
 35                                    struct xattr *evm);
 36 #ifdef CONFIG_FS_POSIX_ACL
 37 extern int posix_xattr_acl(const char *xattrname);
 38 #else
 39 static inline int posix_xattr_acl(const char *xattrname)
 40 {
 41         return 0;
 42 }
 43 #endif
 44 #else
 45 #ifdef CONFIG_INTEGRITY
 46 static inline enum integrity_status evm_verifyxattr(struct dentry *dentry,
 47                                                     const char *xattr_name,
 48                                                     void *xattr_value,
 49                                                     size_t xattr_value_len,
 50                                         struct integrity_iint_cache *iint)
 51 {
 52         return INTEGRITY_UNKNOWN;
 53 }
 54 #endif
 55 
 56 static inline int evm_inode_setattr(struct dentry *dentry, struct iattr *attr)
 57 {
 58         return 0;
 59 }
 60 
 61 static inline void evm_inode_post_setattr(struct dentry *dentry, int ia_valid)
 62 {
 63         return;
 64 }
 65 
 66 static inline int evm_inode_setxattr(struct dentry *dentry, const char *name,
 67                                      const void *value, size_t size)
 68 {
 69         return 0;
 70 }
 71 
 72 static inline void evm_inode_post_setxattr(struct dentry *dentry,
 73                                            const char *xattr_name,
 74                                            const void *xattr_value,
 75                                            size_t xattr_value_len)
 76 {
 77         return;
 78 }
 79 
 80 static inline int evm_inode_removexattr(struct dentry *dentry,
 81                                         const char *xattr_name)
 82 {
 83         return 0;
 84 }
 85 
 86 static inline void evm_inode_post_removexattr(struct dentry *dentry,
 87                                               const char *xattr_name)
 88 {
 89         return;
 90 }
 91 
 92 static inline int evm_inode_init_security(struct inode *inode,
 93                                           const struct xattr *xattr_array,
 94                                           struct xattr *evm)
 95 {
 96         return 0;
 97 }
 98 
 99 #endif /* CONFIG_EVM */
100 #endif /* LINUX_EVM_H */
101 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp