/security/ |
D | inode.c | 28 static inline int positive(struct dentry *dentry) in positive() argument 30 return dentry->d_inode && !d_unhashed(dentry); in positive() 40 static struct dentry *get_sb(struct file_system_type *fs_type, in get_sb() 82 struct dentry *securityfs_create_file(const char *name, umode_t mode, in securityfs_create_file() 83 struct dentry *parent, void *data, in securityfs_create_file() 86 struct dentry *dentry; in securityfs_create_file() local 108 dentry = lookup_one_len2(name, mount, parent, strlen(name)); in securityfs_create_file() 109 if (IS_ERR(dentry)) in securityfs_create_file() 112 if (dentry->d_inode) { in securityfs_create_file() 135 d_instantiate(dentry, inode); in securityfs_create_file() [all …]
|
D | security.c | 214 int security_quota_on(struct dentry *dentry) in security_quota_on() argument 216 return security_ops->quota_on(dentry); in security_quota_on() 295 int security_sb_statfs(struct dentry *dentry) in security_sb_statfs() argument 297 return security_ops->sb_statfs(dentry); in security_sb_statfs() 351 int security_dentry_init_security(struct dentry *dentry, int mode, in security_dentry_init_security() argument 355 return security_ops->dentry_init_security(dentry, mode, name, in security_dentry_init_security() 407 int security_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, in security_path_mknod() argument 410 if (unlikely(IS_PRIVATE(dir->dentry->d_inode))) in security_path_mknod() 412 return security_ops->path_mknod(dir, dentry, mode, dev); in security_path_mknod() 416 int security_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode) in security_path_mkdir() argument [all …]
|
D | capability.c | 45 static int cap_quota_on(struct dentry *dentry) in cap_quota_on() argument 92 static int cap_sb_statfs(struct dentry *dentry) in cap_sb_statfs() argument 135 static int cap_dentry_init_security(struct dentry *dentry, int mode, in cap_dentry_init_security() argument 158 static int cap_inode_create(struct inode *inode, struct dentry *dentry, in cap_inode_create() argument 164 static int cap_inode_link(struct dentry *old_dentry, struct inode *inode, in cap_inode_link() 165 struct dentry *new_dentry) in cap_inode_link() 170 static int cap_inode_unlink(struct inode *inode, struct dentry *dentry) in cap_inode_unlink() argument 175 static int cap_inode_symlink(struct inode *inode, struct dentry *dentry, in cap_inode_symlink() argument 181 static int cap_inode_mkdir(struct inode *inode, struct dentry *dentry, in cap_inode_mkdir() argument 187 static int cap_inode_rmdir(struct inode *inode, struct dentry *dentry) in cap_inode_rmdir() argument [all …]
|
D | commoncap.c | 324 int cap_inode_need_killpriv(struct dentry *dentry) in cap_inode_need_killpriv() argument 326 struct inode *inode = dentry->d_inode; in cap_inode_need_killpriv() 332 error = inode->i_op->getxattr(dentry, XATTR_NAME_CAPS, NULL, 0); in cap_inode_need_killpriv() 346 int cap_inode_killpriv(struct dentry *dentry) in cap_inode_killpriv() argument 348 struct inode *inode = dentry->d_inode; in cap_inode_killpriv() 353 return inode->i_op->removexattr(dentry, XATTR_NAME_CAPS); in cap_inode_killpriv() 403 int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data *cpu_caps) in get_vfs_caps_from_disk() argument 405 struct inode *inode = dentry->d_inode; in get_vfs_caps_from_disk() 416 size = inode->i_op->getxattr((struct dentry *)dentry, XATTR_NAME_CAPS, &caps, in get_vfs_caps_from_disk() 464 struct dentry *dentry; in get_file_caps() local [all …]
|
D | lsm_audit.c | 240 inode = a->u.path.dentry->d_inode; in dump_common_audit_data() 253 inode = a->u.op->path.dentry->d_inode; in dump_common_audit_data() 267 audit_log_untrustedstring(ab, a->u.dentry->d_name.name); in dump_common_audit_data() 269 inode = a->u.dentry->d_inode; in dump_common_audit_data() 278 struct dentry *dentry; in dump_common_audit_data() local 282 dentry = d_find_alias(inode); in dump_common_audit_data() 283 if (dentry) { in dump_common_audit_data() 286 dentry->d_name.name); in dump_common_audit_data() 287 dput(dentry); in dump_common_audit_data() 338 if (u->path.dentry) { in dump_common_audit_data()
|
/security/integrity/evm/ |
D | evm_main.c | 75 static int evm_find_protected_xattrs(struct dentry *dentry) in evm_find_protected_xattrs() argument 77 struct inode *inode = dentry->d_inode; in evm_find_protected_xattrs() 86 error = inode->i_op->getxattr(dentry, *xattr, NULL, 0); in evm_find_protected_xattrs() 111 static enum integrity_status evm_verify_hmac(struct dentry *dentry, in evm_verify_hmac() argument 128 rc = vfs_getxattr_alloc(dentry, XATTR_NAME_EVM, (char **)&xattr_data, 0, in evm_verify_hmac() 133 rc = evm_find_protected_xattrs(dentry); in evm_verify_hmac() 149 rc = evm_calc_hmac(dentry, xattr_name, xattr_value, in evm_verify_hmac() 159 rc = evm_calc_hash(dentry, xattr_name, xattr_value, in evm_verify_hmac() 168 evm_update_evmxattr(dentry, xattr_name, xattr_value, in evm_verify_hmac() 226 enum integrity_status evm_verifyxattr(struct dentry *dentry, in evm_verifyxattr() argument [all …]
|
D | evm_crypto.c | 128 static int evm_calc_hmac_or_hash(struct dentry *dentry, in evm_calc_hmac_or_hash() argument 134 struct inode *inode = dentry->d_inode; in evm_calc_hmac_or_hash() 157 size = vfs_getxattr_alloc(dentry, *xattrname, in evm_calc_hmac_or_hash() 178 int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name, in evm_calc_hmac() argument 182 return evm_calc_hmac_or_hash(dentry, req_xattr_name, req_xattr_value, in evm_calc_hmac() 186 int evm_calc_hash(struct dentry *dentry, const char *req_xattr_name, in evm_calc_hash() argument 190 return evm_calc_hmac_or_hash(dentry, req_xattr_name, req_xattr_value, in evm_calc_hash() 199 int evm_update_evmxattr(struct dentry *dentry, const char *xattr_name, in evm_update_evmxattr() argument 202 struct inode *inode = dentry->d_inode; in evm_update_evmxattr() 206 rc = evm_calc_hmac(dentry, xattr_name, xattr_value, in evm_update_evmxattr() [all …]
|
D | evm.h | 39 int evm_update_evmxattr(struct dentry *dentry, 43 int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name, 46 int evm_calc_hash(struct dentry *dentry, const char *req_xattr_name,
|
/security/integrity/ima/ |
D | ima_appraise.c | 48 static int ima_fix_xattr(struct dentry *dentry, in ima_fix_xattr() argument 62 rc = __vfs_setxattr_noperm(dentry, XATTR_NAME_IMA, in ima_fix_xattr() 165 int ima_read_xattr(struct dentry *dentry, in ima_read_xattr() argument 168 struct inode *inode = dentry->d_inode; in ima_read_xattr() 173 return vfs_getxattr_alloc(dentry, XATTR_NAME_IMA, (char **)xattr_value, in ima_read_xattr() 192 struct dentry *dentry = file->f_dentry; in ima_appraise_measurement() local 193 struct inode *inode = dentry->d_inode; in ima_appraise_measurement() 214 status = evm_verifyxattr(dentry, XATTR_NAME_IMA, xattr_value, rc, iint); in ima_appraise_measurement() 276 if (!ima_fix_xattr(dentry, iint)) in ima_appraise_measurement() 293 struct dentry *dentry = file->f_dentry; in ima_update_xattr() local [all …]
|
D | ima_fs.c | 284 static struct dentry *ima_dir; 285 static struct dentry *binary_runtime_measurements; 286 static struct dentry *ascii_runtime_measurements; 287 static struct dentry *runtime_measurements_count; 288 static struct dentry *violations; 289 static struct dentry *ima_policy;
|
D | ima.h | 181 int ima_read_xattr(struct dentry *dentry, 218 static inline int ima_read_xattr(struct dentry *dentry, in ima_read_xattr() argument
|
/security/tomoyo/ |
D | realpath.c | 100 struct inode *inode = path->dentry->d_inode; in tomoyo_get_absolute_path() 121 static char *tomoyo_get_dentry_path(struct dentry *dentry, char * const buffer, in tomoyo_get_dentry_path() argument 126 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path() 128 struct inode *inode = dentry->d_inode; in tomoyo_get_dentry_path() 147 static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer, in tomoyo_get_local_path() argument 150 struct super_block *sb = dentry->d_sb; in tomoyo_get_local_path() 151 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path() 222 struct inode *inode = path->dentry->d_inode; in tomoyo_get_socket_name() 255 struct dentry *dentry = path->dentry; in tomoyo_realpath_from_path() local 257 if (!dentry) in tomoyo_realpath_from_path() [all …]
|
D | tomoyo.c | 147 static int tomoyo_inode_getattr(struct vfsmount *mnt, struct dentry *dentry) in tomoyo_inode_getattr() argument 149 struct path path = { mnt, dentry }; in tomoyo_inode_getattr() 173 static int tomoyo_path_unlink(struct path *parent, struct dentry *dentry) in tomoyo_path_unlink() argument 175 struct path path = { parent->mnt, dentry }; in tomoyo_path_unlink() 188 static int tomoyo_path_mkdir(struct path *parent, struct dentry *dentry, in tomoyo_path_mkdir() argument 191 struct path path = { parent->mnt, dentry }; in tomoyo_path_mkdir() 204 static int tomoyo_path_rmdir(struct path *parent, struct dentry *dentry) in tomoyo_path_rmdir() argument 206 struct path path = { parent->mnt, dentry }; in tomoyo_path_rmdir() 219 static int tomoyo_path_symlink(struct path *parent, struct dentry *dentry, in tomoyo_path_symlink() argument 222 struct path path = { parent->mnt, dentry }; in tomoyo_path_symlink() [all …]
|
D | condition.c | 696 struct dentry *dentry = NULL; in tomoyo_get_attributes() local 702 dentry = obj->path1.dentry; in tomoyo_get_attributes() 703 if (!dentry) in tomoyo_get_attributes() 707 dentry = obj->path2.dentry; in tomoyo_get_attributes() 708 if (!dentry) in tomoyo_get_attributes() 712 if (!dentry) in tomoyo_get_attributes() 714 dentry = dget_parent(dentry); in tomoyo_get_attributes() 717 inode = dentry->d_inode; in tomoyo_get_attributes() 730 dput(dentry); in tomoyo_get_attributes()
|
/security/apparmor/ |
D | lsm.c | 186 struct dentry *dentry, u32 mask, in common_perm_dir_dentry() argument 189 struct path path = { dir->mnt, dentry }; in common_perm_dir_dentry() 204 struct dentry *dentry, u32 mask) in common_perm_mnt_dentry() argument 206 struct path path = { mnt, dentry }; in common_perm_mnt_dentry() 207 struct path_cond cond = { dentry->d_inode->i_uid, in common_perm_mnt_dentry() 208 dentry->d_inode->i_mode in common_perm_mnt_dentry() 224 struct dentry *dentry, u32 mask) in common_perm_rm() argument 226 struct inode *inode = dentry->d_inode; in common_perm_rm() 235 return common_perm_dir_dentry(op, dir, dentry, mask, &cond); in common_perm_rm() 248 static int common_perm_create(int op, struct path *dir, struct dentry *dentry, in common_perm_create() argument [all …]
|
D | apparmorfs.c | 386 static struct dentry *create_profile_file(struct dentry *dir, const char *name, in create_profile_file() 391 struct dentry *dent; in create_profile_file() 401 int __aa_fs_profile_mkdir(struct aa_profile *profile, struct dentry *parent) in __aa_fs_profile_mkdir() 404 struct dentry *dent = NULL, *dir; in __aa_fs_profile_mkdir() 501 int __aa_fs_namespace_mkdir(struct aa_namespace *ns, struct dentry *parent, in __aa_fs_namespace_mkdir() 506 struct dentry *dent, *dir; in __aa_fs_namespace_mkdir() 835 struct dentry *parent) in aafs_create_file() 839 fs_file->dentry = securityfs_create_file(fs_file->name, in aafs_create_file() 843 if (IS_ERR(fs_file->dentry)) { in aafs_create_file() 844 error = PTR_ERR(fs_file->dentry); in aafs_create_file() [all …]
|
D | path.c | 65 res = dentry_path(path->dentry, buf, buflen); in d_namespace_path() 71 if (path->dentry->d_sb->s_magic == PROC_SUPER_MAGIC && in d_namespace_path() 100 res = dentry_path_raw(path->dentry, buf, buflen); in d_namespace_path() 117 if (d_unlinked(path->dentry) && path->dentry->d_inode && in d_namespace_path()
|
D | file.c | 260 static inline bool is_deleted(struct dentry *dentry) in is_deleted() argument 262 if (d_unlinked(dentry) && dentry->d_inode->i_nlink == 0) in is_deleted() 289 if (error == -ENOENT && is_deleted(path->dentry)) { in aa_path_perm() 348 int aa_path_link(struct aa_profile *profile, struct dentry *old_dentry, in aa_path_link() 349 struct path *new_dir, struct dentry *new_dentry) in aa_path_link()
|
/security/selinux/ |
D | selinuxfs.c | 66 static struct dentry *bool_dir; 72 static struct dentry *class_dir; 78 static struct dentry *policycap_dir; 349 static struct dentry *sel_make_dir(struct dentry *dir, const char *name, 1056 const char *name = filep->f_path.dentry->d_name.name; in sel_read_bool() 1090 const char *name = filep->f_path.dentry->d_name.name; in sel_write_bool() 1196 static void sel_remove_entries(struct dentry *de) in sel_remove_entries() 1203 struct dentry *d = list_entry(node, struct dentry, d_child); in sel_remove_entries() 1230 struct dentry *dentry = NULL; in sel_make_bools() local 1231 struct dentry *dir = bool_dir; in sel_make_bools() [all …]
|
D | hooks.c | 339 static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry); 421 struct dentry *root = sb->s_root; in sb_finish_set_opts() 1238 static int selinux_genfs_get_sid(struct dentry *dentry, in selinux_genfs_get_sid() argument 1244 struct super_block *sb = dentry->d_inode->i_sb; in selinux_genfs_get_sid() 1251 path = dentry_path_raw(dentry, buffer, PAGE_SIZE); in selinux_genfs_get_sid() 1271 static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry) in inode_doinit_with_dentry() 1276 struct dentry *dentry; in inode_doinit_with_dentry() local 1314 dentry = dget(opt_dentry); in inode_doinit_with_dentry() 1317 dentry = d_find_alias(inode); in inode_doinit_with_dentry() 1319 if (!dentry) { in inode_doinit_with_dentry() [all …]
|
/security/smack/ |
D | smack_lsm.c | 209 struct dentry *dp) in smk_fetch() 547 struct dentry *root = sb->s_root; in smack_sb_kern_mount() 645 static int smack_sb_statfs(struct dentry *dentry) in smack_sb_statfs() argument 647 struct superblock_smack *sbp = dentry->d_sb->s_security; in smack_sb_statfs() 652 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_sb_statfs() 835 static int smack_inode_link(struct dentry *old_dentry, struct inode *dir, in smack_inode_link() 836 struct dentry *new_dentry) in smack_inode_link() 867 static int smack_inode_unlink(struct inode *dir, struct dentry *dentry) in smack_inode_unlink() argument 869 struct inode *ip = dentry->d_inode; in smack_inode_unlink() 874 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_unlink() [all …]
|
D | smack.h | 383 struct dentry *d) in smk_ad_setfield_u_fs_path_dentry() 385 a->a.u.dentry = d; in smk_ad_setfield_u_fs_path_dentry() 414 struct dentry *d) in smk_ad_setfield_u_fs_path_dentry()
|
/security/apparmor/include/ |
D | apparmorfs.h | 30 struct dentry *dentry; member 99 int __aa_fs_profile_mkdir(struct aa_profile *profile, struct dentry *parent); 101 int __aa_fs_namespace_mkdir(struct aa_namespace *ns, struct dentry *parent,
|
D | file.h | 177 int aa_path_link(struct aa_profile *profile, struct dentry *old_dentry, 178 struct path *new_dir, struct dentry *new_dentry);
|
/security/keys/ |
D | big_key.c | 28 #define BIG_KEY_FILE_THRESHOLD (sizeof(struct inode) + sizeof(struct dentry)) 143 path->dentry = NULL; in big_key_destroy()
|