/security/integrity/ima/ |
D | ima.h | 67 void integrity_audit_msg(int audit_msgno, struct inode *inode, 71 static inline void integrity_audit_msg(int audit_msgno, struct inode *inode, in integrity_audit_msg() argument 84 int ima_inode_alloc(struct inode *inode); 86 const char *op, struct inode *inode); 90 void ima_add_violation(struct inode *inode, const unsigned char *filename, 112 int ima_get_action(struct inode *inode, int mask, int function); 113 int ima_must_measure(struct inode *inode, int mask, int function); 121 struct inode *inode); 128 struct integrity_iint_cache *integrity_iint_insert(struct inode *inode); 129 struct integrity_iint_cache *integrity_iint_find(struct inode *inode); [all …]
|
D | ima_main.c | 60 struct inode *inode = dentry->d_inode; in ima_rdwr_violation_check() local 67 if (!S_ISREG(inode->i_mode) || !ima_initialized) in ima_rdwr_violation_check() 70 mutex_lock(&inode->i_mutex); /* file metadata: permissions, xattr */ in ima_rdwr_violation_check() 73 if (atomic_read(&inode->i_readcount) && IS_IMA(inode)) in ima_rdwr_violation_check() 78 must_measure = ima_must_measure(inode, MAY_READ, FILE_CHECK); in ima_rdwr_violation_check() 82 if (atomic_read(&inode->i_writecount) > 0) in ima_rdwr_violation_check() 85 mutex_unlock(&inode->i_mutex); in ima_rdwr_violation_check() 95 ima_add_violation(inode, pathname, in ima_rdwr_violation_check() 98 ima_add_violation(inode, pathname, in ima_rdwr_violation_check() 104 struct inode *inode, struct file *file) in ima_check_last_writer() argument [all …]
|
D | ima_api.c | 42 int violation, struct inode *inode) in ima_store_template() argument 57 integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode, in ima_store_template() 63 result = ima_add_template_entry(entry, violation, op, inode); in ima_store_template() 74 void ima_add_violation(struct inode *inode, const unsigned char *filename, in ima_add_violation() argument 91 result = ima_store_template(entry, violation, inode); in ima_add_violation() 95 integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode, filename, in ima_add_violation() 115 int ima_get_action(struct inode *inode, int mask, int function) in ima_get_action() argument 122 return ima_match_policy(inode, function, mask, flags); in ima_get_action() 125 int ima_must_measure(struct inode *inode, int mask, int function) in ima_must_measure() argument 127 return ima_match_policy(inode, function, mask, IMA_MEASURE); in ima_must_measure() [all …]
|
D | ima_appraise.c | 37 int ima_must_appraise(struct inode *inode, int mask, enum ima_hooks func) in ima_must_appraise() argument 42 return ima_match_policy(inode, func, mask, IMA_APPRAISE); in ima_must_appraise() 122 struct inode *inode = dentry->d_inode; in ima_appraise_measurement() local 131 if (!inode->i_op->getxattr) in ima_appraise_measurement() 142 (inode->i_size == 0) ? INTEGRITY_PASS : INTEGRITY_NOLABEL; in ima_appraise_measurement() 200 integrity_audit_msg(AUDIT_INTEGRITY_DATA, inode, filename, in ima_appraise_measurement() 240 struct inode *inode = dentry->d_inode; in ima_inode_post_setattr() local 244 if (!ima_initialized || !ima_appraise || !S_ISREG(inode->i_mode) in ima_inode_post_setattr() 245 || !inode->i_op->removexattr) in ima_inode_post_setattr() 248 must_appraise = ima_must_appraise(inode, MAY_ACCESS, POST_SETATTR); in ima_inode_post_setattr() [all …]
|
D | ima_audit.c | 31 void integrity_audit_msg(int audit_msgno, struct inode *inode, in integrity_audit_msg() argument 57 if (inode) { in integrity_audit_msg() 59 audit_log_untrustedstring(ab, inode->i_sb->s_id); in integrity_audit_msg() 60 audit_log_format(ab, " ino=%lu", inode->i_ino); in integrity_audit_msg()
|
D | ima_fs.c | 159 static int ima_measurements_open(struct inode *inode, struct file *file) in ima_measurements_open() argument 234 static int ima_ascii_measurements_open(struct inode *inode, struct file *file) in ima_ascii_measurements_open() argument 290 static int ima_open_policy(struct inode * inode, struct file * filp) in ima_open_policy() argument 307 static int ima_release_policy(struct inode *inode, struct file *file) in ima_release_policy() argument
|
D | ima_queue.c | 107 const char *op, struct inode *inode) in ima_add_template_entry() argument 144 integrity_audit_msg(AUDIT_INTEGRITY_PCR, inode, in ima_add_template_entry()
|
/security/integrity/ |
D | iint.c | 33 static struct integrity_iint_cache *__integrity_iint_find(struct inode *inode) in __integrity_iint_find() argument 41 if (inode < iint->inode) in __integrity_iint_find() 43 else if (inode > iint->inode) in __integrity_iint_find() 57 struct integrity_iint_cache *integrity_iint_find(struct inode *inode) in integrity_iint_find() argument 61 if (!IS_IMA(inode)) in integrity_iint_find() 65 iint = __integrity_iint_find(inode); in integrity_iint_find() 90 struct integrity_iint_cache *integrity_inode_get(struct inode *inode) in integrity_inode_get() argument 96 iint = integrity_iint_find(inode); in integrity_inode_get() 111 if (inode < test_iint->inode) in integrity_inode_get() 117 iint->inode = inode; in integrity_inode_get() [all …]
|
D | integrity.h | 67 struct inode *inode; /* back pointer to inode in question */ member 81 struct integrity_iint_cache *integrity_iint_insert(struct inode *inode); 82 struct integrity_iint_cache *integrity_iint_find(struct inode *inode);
|
/security/integrity/evm/ |
D | evm_crypto.c | 95 static void hmac_add_misc(struct shash_desc *desc, struct inode *inode, in hmac_add_misc() argument 107 hmac_misc.ino = inode->i_ino; in hmac_add_misc() 108 hmac_misc.generation = inode->i_generation; in hmac_add_misc() 109 hmac_misc.uid = from_kuid(&init_user_ns, inode->i_uid); in hmac_add_misc() 110 hmac_misc.gid = from_kgid(&init_user_ns, inode->i_gid); in hmac_add_misc() 111 hmac_misc.mode = inode->i_mode; in hmac_add_misc() 114 crypto_shash_update(desc, inode->i_sb->s_uuid, in hmac_add_misc() 115 sizeof(inode->i_sb->s_uuid)); in hmac_add_misc() 132 struct inode *inode = dentry->d_inode; in evm_calc_hmac_or_hash() local 140 if (!inode->i_op || !inode->i_op->getxattr) in evm_calc_hmac_or_hash() [all …]
|
D | evm_main.c | 56 struct inode *inode = dentry->d_inode; in evm_find_protected_xattrs() local 61 if (!inode->i_op || !inode->i_op->getxattr) in evm_find_protected_xattrs() 65 error = inode->i_op->getxattr(dentry, *xattr, NULL, 0); in evm_find_protected_xattrs() 231 struct inode *inode = dentry->d_inode; in evm_verify_current_integrity() local 233 if (!evm_initialized || !S_ISREG(inode->i_mode) || evm_fixmode) in evm_verify_current_integrity() 334 struct inode *inode = dentry->d_inode; in evm_inode_post_removexattr() local 339 mutex_lock(&inode->i_mutex); in evm_inode_post_removexattr() 341 mutex_unlock(&inode->i_mutex); in evm_inode_post_removexattr() 387 int evm_inode_init_security(struct inode *inode, in evm_inode_init_security() argument 402 rc = evm_init_hmac(inode, lsm_xattr, xattr_data->digest); in evm_inode_init_security()
|
D | evm.h | 46 extern int evm_init_hmac(struct inode *inode, const struct xattr *xattr,
|
/security/tomoyo/ |
D | realpath.c | 100 struct inode *inode = path->dentry->d_inode; in tomoyo_get_absolute_path() local 101 if (inode && S_ISDIR(inode->i_mode)) { in tomoyo_get_absolute_path() 128 struct inode *inode = dentry->d_inode; in tomoyo_get_dentry_path() local 129 if (inode && S_ISDIR(inode->i_mode)) { in tomoyo_get_dentry_path() 171 struct inode *inode = sb->s_root->d_inode; in tomoyo_get_local_path() local 176 if (inode->i_op && !inode->i_op->rename) in tomoyo_get_local_path() 222 struct inode *inode = path->dentry->d_inode; in tomoyo_get_socket_name() local 223 struct socket *sock = inode ? SOCKET_I(inode) : NULL; in tomoyo_get_socket_name() 262 struct inode *inode; in tomoyo_realpath_from_path() local 280 inode = sb->s_root->d_inode; in tomoyo_realpath_from_path() [all …]
|
D | securityfs_if.c | 136 static int tomoyo_open(struct inode *inode, struct file *file) in tomoyo_open() argument 149 static int tomoyo_release(struct inode *inode, struct file *file) in tomoyo_release() argument
|
/security/ |
D | inode.c | 88 struct inode *dir, *inode; in securityfs_create_file() local 117 inode = new_inode(dir->i_sb); in securityfs_create_file() 118 if (!inode) { in securityfs_create_file() 123 inode->i_ino = get_next_ino(); in securityfs_create_file() 124 inode->i_mode = mode; in securityfs_create_file() 125 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; in securityfs_create_file() 126 inode->i_private = data; in securityfs_create_file() 128 inode->i_op = &simple_dir_inode_operations; in securityfs_create_file() 129 inode->i_fop = &simple_dir_operations; in securityfs_create_file() 130 inc_nlink(inode); in securityfs_create_file() [all …]
|
D | lsm_audit.c | 236 struct inode *inode; in dump_common_audit_data() local 240 inode = a->u.path.dentry->d_inode; in dump_common_audit_data() 241 if (inode) { in dump_common_audit_data() 243 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data() 244 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data() 249 struct inode *inode; in dump_common_audit_data() local 253 inode = a->u.op->path.dentry->d_inode; in dump_common_audit_data() 254 if (inode) { in dump_common_audit_data() 256 audit_log_untrustedstring(ab, inode->i_sb->s_id); in dump_common_audit_data() 257 audit_log_format(ab, " ino=%lu", inode->i_ino); in dump_common_audit_data() [all …]
|
D | security.c | 335 int security_inode_alloc(struct inode *inode) in security_inode_alloc() argument 337 inode->i_security = NULL; in security_inode_alloc() 338 return security_ops->inode_alloc_security(inode); in security_inode_alloc() 341 void security_inode_free(struct inode *inode) in security_inode_free() argument 343 integrity_inode_free(inode); in security_inode_free() 344 security_ops->inode_free_security(inode); in security_inode_free() 347 int security_inode_init_security(struct inode *inode, struct inode *dir, in security_inode_init_security() argument 355 if (unlikely(IS_PRIVATE(inode))) in security_inode_init_security() 360 return security_ops->inode_init_security(inode, dir, qstr, in security_inode_init_security() 363 ret = security_ops->inode_init_security(inode, dir, qstr, in security_inode_init_security() [all …]
|
D | capability.c | 132 static int cap_inode_alloc_security(struct inode *inode) in cap_inode_alloc_security() argument 137 static void cap_inode_free_security(struct inode *inode) in cap_inode_free_security() argument 141 static int cap_inode_init_security(struct inode *inode, struct inode *dir, in cap_inode_init_security() argument 148 static int cap_inode_create(struct inode *inode, struct dentry *dentry, in cap_inode_create() argument 154 static int cap_inode_link(struct dentry *old_dentry, struct inode *inode, in cap_inode_link() argument 160 static int cap_inode_unlink(struct inode *inode, struct dentry *dentry) in cap_inode_unlink() argument 165 static int cap_inode_symlink(struct inode *inode, struct dentry *dentry, in cap_inode_symlink() argument 171 static int cap_inode_mkdir(struct inode *inode, struct dentry *dentry, in cap_inode_mkdir() argument 177 static int cap_inode_rmdir(struct inode *inode, struct dentry *dentry) in cap_inode_rmdir() argument 182 static int cap_inode_mknod(struct inode *inode, struct dentry *dentry, in cap_inode_mknod() argument [all …]
|
D | commoncap.c | 321 struct inode *inode = dentry->d_inode; in cap_inode_need_killpriv() local 324 if (!inode->i_op->getxattr) in cap_inode_need_killpriv() 327 error = inode->i_op->getxattr(dentry, XATTR_NAME_CAPS, NULL, 0); in cap_inode_need_killpriv() 343 struct inode *inode = dentry->d_inode; in cap_inode_killpriv() local 345 if (!inode->i_op->removexattr) in cap_inode_killpriv() 348 return inode->i_op->removexattr(dentry, XATTR_NAME_CAPS); in cap_inode_killpriv() 400 struct inode *inode = dentry->d_inode; in get_vfs_caps_from_disk() local 408 if (!inode || !inode->i_op->getxattr) in get_vfs_caps_from_disk() 411 size = inode->i_op->getxattr((struct dentry *)dentry, XATTR_NAME_CAPS, &caps, in get_vfs_caps_from_disk()
|
/security/selinux/ |
D | selinuxfs.c | 218 static int sel_open_handle_status(struct inode *inode, struct file *filp) in sel_open_handle_status() argument 371 static int sel_open_policy(struct inode *inode, struct file *filp) in sel_open_policy() argument 393 if (i_size_read(inode) != security_policydb_len()) { in sel_open_policy() 394 mutex_lock(&inode->i_mutex); in sel_open_policy() 395 i_size_write(inode, security_policydb_len()); in sel_open_policy() 396 mutex_unlock(&inode->i_mutex); in sel_open_policy() 419 static int sel_release_policy(struct inode *inode, struct file *filp) in sel_release_policy() argument 1027 static struct inode *sel_make_inode(struct super_block *sb, int mode) in sel_make_inode() 1029 struct inode *ret = new_inode(sb); in sel_make_inode() 1222 struct inode *inode = NULL; in sel_make_bools() local [all …]
|
D | hooks.c | 212 static int inode_alloc_security(struct inode *inode) in inode_alloc_security() argument 223 isec->inode = inode; in inode_alloc_security() 227 inode->i_security = isec; in inode_alloc_security() 240 static void inode_free_security(struct inode *inode) in inode_free_security() argument 242 struct inode_security_struct *isec = inode->i_security; in inode_free_security() 243 struct superblock_security_struct *sbsec = inode->i_sb->s_security; in inode_free_security() 323 static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry); 325 static inline int inode_doinit(struct inode *inode) in inode_doinit() argument 327 return inode_doinit_with_dentry(inode, NULL); in inode_doinit() 387 struct inode *root_inode = root->d_inode; in sb_finish_set_opts() [all …]
|
/security/smack/ |
D | smack_lsm.c | 56 static char *smk_fetch(const char *name, struct inode *ip, struct dentry *dp) in smk_fetch() 327 struct inode *inode = root->d_inode; in smack_sb_kern_mount() local 371 isp = inode->i_security; in smack_sb_kern_mount() 373 inode->i_security = new_inode_smack(sp->smk_root); in smack_sb_kern_mount() 459 struct inode *inode = file_inode(bprm->file); in smack_bprm_set_creds() local 471 isp = inode->i_security; in smack_bprm_set_creds() 525 static int smack_inode_alloc_security(struct inode *inode) in smack_inode_alloc_security() argument 527 inode->i_security = new_inode_smack(smk_of_current()); in smack_inode_alloc_security() 528 if (inode->i_security == NULL) in smack_inode_alloc_security() 539 static void smack_inode_free_security(struct inode *inode) in smack_inode_free_security() argument [all …]
|
D | smack.h | 241 static inline int smk_inode_transmutable(const struct inode *isp) in smk_inode_transmutable() 250 static inline char *smk_of_inode(const struct inode *isp) in smk_of_inode() 339 struct inode *i) in smk_ad_setfield_u_fs_inode() 341 a->a.u.inode = i; in smk_ad_setfield_u_fs_inode() 373 struct inode *i) in smk_ad_setfield_u_fs_inode()
|
/security/apparmor/include/ |
D | apparmor.h | 99 static inline bool mediated_filesystem(struct inode *inode) in mediated_filesystem() argument 101 return !(inode->i_sb->s_flags & MS_NOUSER); in mediated_filesystem()
|
/security/keys/ |
D | proc.c | 22 static int proc_keys_open(struct inode *inode, struct file *file); 43 static int proc_key_users_open(struct inode *inode, struct file *file); 105 static int proc_keys_open(struct inode *inode, struct file *file) in proc_keys_open() argument 299 static int proc_key_users_open(struct inode *inode, struct file *file) in proc_key_users_open() argument
|