Home
last modified time | relevance | path

Searched refs:dentry (Results 1 – 25 of 44) sorted by relevance

12

/security/integrity/evm/
Devm_main.c92 static int evm_find_protected_xattrs(struct dentry *dentry) in evm_find_protected_xattrs() argument
94 struct inode *inode = d_backing_inode(dentry); in evm_find_protected_xattrs()
103 error = __vfs_getxattr(dentry, inode, xattr->name, NULL, 0, in evm_find_protected_xattrs()
129 static enum integrity_status evm_verify_hmac(struct dentry *dentry, in evm_verify_hmac() argument
149 rc = vfs_getxattr_alloc(dentry, XATTR_NAME_EVM, (char **)&xattr_data, 0, in evm_verify_hmac()
154 rc = evm_find_protected_xattrs(dentry); in evm_verify_hmac()
176 rc = evm_calc_hmac(dentry, xattr_name, xattr_value, in evm_verify_hmac()
189 rc = evm_calc_hash(dentry, xattr_name, xattr_value, in evm_verify_hmac()
197 inode = d_backing_inode(dentry); in evm_verify_hmac()
206 evm_update_evmxattr(dentry, xattr_name, in evm_verify_hmac()
[all …]
Devm_crypto.c186 static int evm_calc_hmac_or_hash(struct dentry *dentry, in evm_calc_hmac_or_hash() argument
192 struct inode *inode = d_backing_inode(dentry); in evm_calc_hmac_or_hash()
227 size = vfs_getxattr_alloc(dentry, xattr->name, in evm_calc_hmac_or_hash()
253 int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name, in evm_calc_hmac() argument
257 return evm_calc_hmac_or_hash(dentry, req_xattr_name, req_xattr_value, in evm_calc_hmac()
261 int evm_calc_hash(struct dentry *dentry, const char *req_xattr_name, in evm_calc_hash() argument
265 return evm_calc_hmac_or_hash(dentry, req_xattr_name, req_xattr_value, in evm_calc_hash()
269 static int evm_is_immutable(struct dentry *dentry, struct inode *inode) in evm_is_immutable() argument
280 rc = vfs_getxattr_alloc(dentry, XATTR_NAME_EVM, (char **)&xattr_data, 0, in evm_is_immutable()
302 int evm_update_evmxattr(struct dentry *dentry, const char *xattr_name, in evm_update_evmxattr() argument
[all …]
Devm.h52 int evm_update_evmxattr(struct dentry *dentry,
56 int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name,
59 int evm_calc_hash(struct dentry *dentry, const char *req_xattr_name,
Devm_secfs.c21 static struct dentry *evm_dir;
22 static struct dentry *evm_init_tpm;
23 static struct dentry *evm_symlink;
26 static struct dentry *evm_xattrs;
/security/
Dinode.c107 static struct dentry *securityfs_create_dentry(const char *name, umode_t mode, in securityfs_create_dentry()
108 struct dentry *parent, void *data, in securityfs_create_dentry()
112 struct dentry *dentry; in securityfs_create_dentry() local
131 dentry = lookup_one_len2(name, mount, parent, strlen(name)); in securityfs_create_dentry()
132 if (IS_ERR(dentry)) in securityfs_create_dentry()
135 if (d_really_is_positive(dentry)) { in securityfs_create_dentry()
161 d_instantiate(dentry, inode); in securityfs_create_dentry()
162 dget(dentry); in securityfs_create_dentry()
164 return dentry; in securityfs_create_dentry()
167 dput(dentry); in securityfs_create_dentry()
[all …]
Dsecurity.c737 int security_quota_on(struct dentry *dentry) in security_quota_on() argument
739 return call_int_hook(quota_on, 0, dentry); in security_quota_on()
852 int security_sb_statfs(struct dentry *dentry) in security_sb_statfs() argument
854 return call_int_hook(sb_statfs, 0, dentry); in security_sb_statfs()
951 int security_dentry_init_security(struct dentry *dentry, int mode, in security_dentry_init_security() argument
955 return call_int_hook(dentry_init_security, -EOPNOTSUPP, dentry, mode, in security_dentry_init_security()
960 int security_dentry_create_files_as(struct dentry *dentry, int mode, in security_dentry_create_files_as() argument
964 return call_int_hook(dentry_create_files_as, 0, dentry, mode, in security_dentry_create_files_as()
1016 int security_path_mknod(const struct path *dir, struct dentry *dentry, umode_t mode, in security_path_mknod() argument
1019 if (unlikely(IS_PRIVATE(d_backing_inode(dir->dentry)))) in security_path_mknod()
[all …]
Dcommoncap.c295 int cap_inode_need_killpriv(struct dentry *dentry) in cap_inode_need_killpriv() argument
297 struct inode *inode = d_backing_inode(dentry); in cap_inode_need_killpriv()
300 error = __vfs_getxattr(dentry, inode, XATTR_NAME_CAPS, NULL, 0, in cap_inode_need_killpriv()
313 int cap_inode_killpriv(struct dentry *dentry) in cap_inode_killpriv() argument
317 error = __vfs_removexattr(dentry, XATTR_NAME_CAPS); in cap_inode_killpriv()
379 struct dentry *dentry; in cap_inode_getsecurity() local
385 dentry = d_find_any_alias(inode); in cap_inode_getsecurity()
386 if (!dentry) in cap_inode_getsecurity()
390 ret = (int) vfs_getxattr_alloc(dentry, XATTR_NAME_CAPS, in cap_inode_getsecurity()
392 dput(dentry); in cap_inode_getsecurity()
[all …]
Dlsm_audit.c237 inode = d_backing_inode(a->u.path.dentry); in dump_common_audit_data()
263 inode = a->u.op->path.dentry->d_inode; in dump_common_audit_data()
277 audit_log_untrustedstring(ab, a->u.dentry->d_name.name); in dump_common_audit_data()
279 inode = d_backing_inode(a->u.dentry); in dump_common_audit_data()
288 struct dentry *dentry; in dump_common_audit_data() local
292 dentry = d_find_alias(inode); in dump_common_audit_data()
293 if (dentry) { in dump_common_audit_data()
296 dentry->d_name.name); in dump_common_audit_data()
297 dput(dentry); in dump_common_audit_data()
355 if (u->path.dentry) { in dump_common_audit_data()
/security/tomoyo/
Drealpath.c102 struct inode *inode = d_backing_inode(path->dentry); in tomoyo_get_absolute_path()
124 static char *tomoyo_get_dentry_path(struct dentry *dentry, char * const buffer, in tomoyo_get_dentry_path() argument
130 pos = dentry_path_raw(dentry, buffer, buflen - 1); in tomoyo_get_dentry_path()
132 struct inode *inode = d_backing_inode(dentry); in tomoyo_get_dentry_path()
152 static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer, in tomoyo_get_local_path() argument
155 struct super_block *sb = dentry->d_sb; in tomoyo_get_local_path()
156 char *pos = tomoyo_get_dentry_path(dentry, buffer, buflen); in tomoyo_get_local_path()
240 struct dentry *dentry = path->dentry; in tomoyo_realpath_from_path() local
243 if (!dentry) in tomoyo_realpath_from_path()
245 sb = dentry->d_sb; in tomoyo_realpath_from_path()
[all …]
Dtomoyo.c152 static int tomoyo_path_unlink(const struct path *parent, struct dentry *dentry) in tomoyo_path_unlink() argument
154 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_unlink()
168 static int tomoyo_path_mkdir(const struct path *parent, struct dentry *dentry, in tomoyo_path_mkdir() argument
171 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mkdir()
185 static int tomoyo_path_rmdir(const struct path *parent, struct dentry *dentry) in tomoyo_path_rmdir() argument
187 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_rmdir()
201 static int tomoyo_path_symlink(const struct path *parent, struct dentry *dentry, in tomoyo_path_symlink() argument
204 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_symlink()
219 static int tomoyo_path_mknod(const struct path *parent, struct dentry *dentry, in tomoyo_path_mknod() argument
222 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mknod()
[all …]
Dfile.c713 .path1 = { .mnt = path->mnt, .dentry = path->dentry }, in tomoyo_path_number_perm()
720 == TOMOYO_CONFIG_DISABLED || !path->dentry) in tomoyo_path_number_perm()
761 .path1 = { .mnt = path->mnt, .dentry = path->dentry }, in tomoyo_check_open_permission()
807 .path1 = { .mnt = path->mnt, .dentry = path->dentry }, in tomoyo_path_perm()
864 .path1 = { .mnt = path->mnt, .dentry = path->dentry }, in tomoyo_mkdev_perm()
911 .path1 = { .mnt = path1->mnt, .dentry = path1->dentry }, in tomoyo_path2_perm()
912 .path2 = { .mnt = path2->mnt, .dentry = path2->dentry } in tomoyo_path2_perm()
928 if (!d_is_dir(path1->dentry)) in tomoyo_path2_perm()
Dcondition.c716 struct dentry *dentry = NULL; in tomoyo_get_attributes() local
723 dentry = obj->path1.dentry; in tomoyo_get_attributes()
724 if (!dentry) in tomoyo_get_attributes()
728 dentry = obj->path2.dentry; in tomoyo_get_attributes()
729 if (!dentry) in tomoyo_get_attributes()
733 if (!dentry) in tomoyo_get_attributes()
735 dentry = dget_parent(dentry); in tomoyo_get_attributes()
738 inode = d_backing_inode(dentry); in tomoyo_get_attributes()
751 dput(dentry); in tomoyo_get_attributes()
/security/integrity/ima/
Dima_appraise.c60 static int ima_fix_xattr(struct dentry *dentry, in ima_fix_xattr() argument
74 rc = __vfs_setxattr_noperm(dentry, XATTR_NAME_IMA, in ima_fix_xattr()
190 int ima_read_xattr(struct dentry *dentry, in ima_read_xattr() argument
195 ret = vfs_getxattr_alloc(dentry, XATTR_NAME_IMA, (char **)xattr_value, in ima_read_xattr()
322 struct dentry *dentry = file_dentry(file); in ima_appraise_measurement() local
323 struct inode *inode = d_backing_inode(dentry); in ima_appraise_measurement()
349 status = evm_verifyxattr(dentry, XATTR_NAME_IMA, xattr_value, rc, iint); in ima_appraise_measurement()
402 if (!ima_fix_xattr(dentry, iint)) in ima_appraise_measurement()
427 struct dentry *dentry = file_dentry(file); in ima_update_xattr() local
443 ima_fix_xattr(dentry, iint); in ima_update_xattr()
[all …]
Dima_fs.c358 static struct dentry *ima_dir;
359 static struct dentry *ima_symlink;
360 static struct dentry *binary_runtime_measurements;
361 static struct dentry *ascii_runtime_measurements;
362 static struct dentry *runtime_measurements_count;
363 static struct dentry *violations;
364 static struct dentry *ima_policy;
Dima.h267 int ima_read_xattr(struct dentry *dentry,
306 static inline int ima_read_xattr(struct dentry *dentry, in ima_read_xattr() argument
/security/apparmor/
Dapparmorfs.c117 static int aafs_show_path(struct seq_file *seq, struct dentry *dentry) in aafs_show_path() argument
119 seq_printf(seq, "%s:[%lu]", AAFS_NAME, d_inode(dentry)->i_ino); in aafs_show_path()
181 static int __aafs_setup_d_inode(struct inode *dir, struct dentry *dentry, in __aafs_setup_d_inode() argument
189 AA_BUG(!dentry); in __aafs_setup_d_inode()
209 d_instantiate(dentry, inode); in __aafs_setup_d_inode()
210 dget(dentry); in __aafs_setup_d_inode()
231 static struct dentry *aafs_create(const char *name, umode_t mode, in aafs_create()
232 struct dentry *parent, void *data, void *link, in aafs_create()
236 struct dentry *dentry; in aafs_create() local
253 dentry = lookup_one_len(name, parent, strlen(name)); in aafs_create()
[all …]
Dlsm.c217 struct path_cond cond = { d_backing_inode(path->dentry)->i_uid, in common_perm_cond()
218 d_backing_inode(path->dentry)->i_mode in common_perm_cond()
221 if (!path_mediated_fs(path->dentry)) in common_perm_cond()
238 struct dentry *dentry, u32 mask, in common_perm_dir_dentry() argument
241 struct path path = { .mnt = dir->mnt, .dentry = dentry }; in common_perm_dir_dentry()
256 struct dentry *dentry, u32 mask) in common_perm_rm() argument
258 struct inode *inode = d_backing_inode(dentry); in common_perm_rm()
261 if (!inode || !path_mediated_fs(dentry)) in common_perm_rm()
267 return common_perm_dir_dentry(op, dir, dentry, mask, &cond); in common_perm_rm()
281 struct dentry *dentry, u32 mask, umode_t mode) in common_perm_create() argument
[all …]
Dpath.c99 res = dentry_path(path->dentry, buf, buflen); in d_namespace_path()
105 if (path->dentry->d_sb->s_magic == PROC_SUPER_MAGIC && in d_namespace_path()
140 res = dentry_path_raw(path->dentry, buf, buflen); in d_namespace_path()
160 if (d_unlinked(path->dentry) && d_is_positive(path->dentry) && in d_namespace_path()
Dfile.c159 static inline bool is_deleted(struct dentry *dentry) in is_deleted() argument
161 if (d_unlinked(dentry) && d_backing_inode(dentry)->i_nlink == 0) in is_deleted()
464 int aa_path_link(struct aa_label *label, struct dentry *old_dentry, in aa_path_link()
465 const struct path *new_dir, struct dentry *new_dentry) in aa_path_link()
467 struct path link = { .mnt = new_dir->mnt, .dentry = new_dentry }; in aa_path_link()
468 struct path target = { .mnt = new_dir->mnt, .dentry = old_dentry }; in aa_path_link()
627 if (file->f_path.mnt && path_mediated_fs(file->f_path.dentry)) in aa_file_perm()
/security/selinux/
Dselinuxfs.c69 struct dentry *bool_dir;
73 struct dentry *class_dir;
76 struct dentry *policycap_dir;
348 static struct dentry *sel_make_dir(struct dentry *dir, const char *name,
1177 const char *name = filep->f_path.dentry->d_name.name; in sel_read_bool()
1217 const char *name = filep->f_path.dentry->d_name.name; in sel_write_bool()
1318 static void sel_remove_entries(struct dentry *de) in sel_remove_entries()
1330 struct dentry *dentry = NULL; in sel_make_bools() local
1331 struct dentry *dir = fsi->bool_dir; in sel_make_bools()
1361 dentry = d_alloc_name(dir, names[i]); in sel_make_bools()
[all …]
Dhooks.c259 static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry);
268 struct dentry *dentry, in __inode_security_revalidate() argument
285 inode_doinit_with_dentry(inode, dentry); in __inode_security_revalidate()
314 static struct inode_security_struct *backing_inode_security_novalidate(struct dentry *dentry) in backing_inode_security_novalidate() argument
316 struct inode *inode = d_backing_inode(dentry); in backing_inode_security_novalidate()
324 static struct inode_security_struct *backing_inode_security(struct dentry *dentry) in backing_inode_security() argument
326 struct inode *inode = d_backing_inode(dentry); in backing_inode_security()
328 __inode_security_revalidate(inode, dentry, true); in backing_inode_security()
540 struct dentry *root = sb->s_root; in sb_finish_set_opts()
654 struct dentry *root = sbsec->sb->s_root; in selinux_set_mnt_opts()
[all …]
/security/apparmor/include/
Dapparmorfs.h28 struct dentry *dentry; member
111 int __aafs_profile_mkdir(struct aa_profile *profile, struct dentry *parent);
113 int __aafs_ns_mkdir(struct aa_ns *ns, struct dentry *parent, const char *name,
114 struct dentry *dent);
Dlib.h87 static inline bool path_mediated_fs(struct dentry *dentry) in path_mediated_fs() argument
89 return !(dentry->d_sb->s_flags & SB_NOUSER); in path_mediated_fs()
/security/smack/
Dsmack_lsm.c282 struct dentry *dp) in smk_fetch()
783 struct dentry *root = sb->s_root; in smack_set_mnt_opts()
882 static int smack_sb_statfs(struct dentry *dentry) in smack_sb_statfs() argument
884 struct superblock_smack *sbp = dentry->d_sb->s_security; in smack_sb_statfs()
889 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_sb_statfs()
1033 static int smack_inode_link(struct dentry *old_dentry, struct inode *dir, in smack_inode_link()
1034 struct dentry *new_dentry) in smack_inode_link()
1065 static int smack_inode_unlink(struct inode *dir, struct dentry *dentry) in smack_inode_unlink() argument
1067 struct inode *ip = d_backing_inode(dentry); in smack_inode_unlink()
1072 smk_ad_setfield_u_fs_path_dentry(&ad, dentry); in smack_inode_unlink()
[all …]
/security/lockdown/
Dlockdown.c176 struct dentry *dentry; in lockdown_secfs_init() local
178 dentry = securityfs_create_file("lockdown", 0600, NULL, NULL, in lockdown_secfs_init()
180 return PTR_ERR_OR_ZERO(dentry); in lockdown_secfs_init()

12