Home
last modified time | relevance | path

Searched refs:path (Results 1 – 25 of 38) sorted by relevance

12

/security/tomoyo/
Dtomoyo.c120 static int tomoyo_inode_getattr(const struct path *path) in tomoyo_inode_getattr() argument
122 return tomoyo_path_perm(TOMOYO_TYPE_GETATTR, path, NULL); in tomoyo_inode_getattr()
132 static int tomoyo_path_truncate(const struct path *path) in tomoyo_path_truncate() argument
134 return tomoyo_path_perm(TOMOYO_TYPE_TRUNCATE, path, NULL); in tomoyo_path_truncate()
145 static int tomoyo_path_unlink(const struct path *parent, struct dentry *dentry) in tomoyo_path_unlink()
147 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_unlink() local
149 return tomoyo_path_perm(TOMOYO_TYPE_UNLINK, &path, NULL); in tomoyo_path_unlink()
161 static int tomoyo_path_mkdir(const struct path *parent, struct dentry *dentry, in tomoyo_path_mkdir()
164 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mkdir() local
166 return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path, in tomoyo_path_mkdir()
[all …]
Drealpath.c94 static char *tomoyo_get_absolute_path(const struct path *path, char * const buffer, in tomoyo_get_absolute_path() argument
101 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path()
103 struct inode *inode = d_backing_inode(path->dentry); in tomoyo_get_absolute_path()
237 char *tomoyo_realpath_from_path(const struct path *path) in tomoyo_realpath_from_path() argument
242 struct dentry *dentry = path->dentry; in tomoyo_realpath_from_path()
269 if (!path->mnt || in tomoyo_realpath_from_path()
272 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
276 pos = tomoyo_get_absolute_path(path, buf, buf_len - 1); in tomoyo_realpath_from_path()
282 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
306 struct path path; in tomoyo_realpath_nofollow() local
[all …]
Dfile.c149 static bool tomoyo_get_realpath(struct tomoyo_path_info *buf, const struct path *path) in tomoyo_get_realpath() argument
151 buf->name = tomoyo_realpath_from_path(path); in tomoyo_get_realpath()
169 [r->param.path.operation], in tomoyo_audit_path_log()
170 r->param.path.filename->name); in tomoyo_audit_path_log()
258 if (acl->perm & (1 << r->param.path.operation)) { in tomoyo_check_path_acl()
259 r->param.path.matched_path = in tomoyo_check_path_acl()
260 tomoyo_compare_name_union(r->param.path.filename, in tomoyo_check_path_acl()
262 return r->param.path.matched_path != NULL; in tomoyo_check_path_acl()
583 r->param.path.filename = filename; in tomoyo_path_permission()
584 r->param.path.operation = operation; in tomoyo_path_permission()
[all …]
Dmount.c79 const struct path *dir, const char *type, in tomoyo_mount_acl()
83 struct path path; in tomoyo_mount_acl() local
136 if (!dev_name || kern_path(dev_name, LOOKUP_FOLLOW, &path)) { in tomoyo_mount_acl()
140 obj.path1 = path; in tomoyo_mount_acl()
141 requested_dev_name = tomoyo_realpath_from_path(&path); in tomoyo_mount_acl()
191 int tomoyo_mount_permission(const char *dev_name, const struct path *path, in tomoyo_mount_permission() argument
237 error = tomoyo_mount_acl(&r, dev_name, path, type, flags); in tomoyo_mount_permission()
Dload_policy.c39 struct path path; in tomoyo_policy_loader_exists() local
43 if (kern_path(tomoyo_loader, LOOKUP_FOLLOW, &path)) { in tomoyo_policy_loader_exists()
48 path_put(&path); in tomoyo_policy_loader_exists()
Dcommon.h440 } path; member
591 struct path path1;
593 struct path path2;
959 char *tomoyo_realpath_from_path(const struct path *path);
971 const struct path *path, const int flag);
982 int tomoyo_mkdev_perm(const u8 operation, const struct path *path,
984 int tomoyo_mount_permission(const char *dev_name, const struct path *path,
988 int tomoyo_path2_perm(const u8 operation, const struct path *path1,
989 const struct path *path2);
990 int tomoyo_path_number_perm(const u8 operation, const struct path *path,
[all …]
/security/apparmor/
Dpath.c48 static int disconnect(const struct path *path, char *buf, char **name, in disconnect() argument
55 our_mnt(path->mnt))) { in disconnect()
88 static int d_namespace_path(const struct path *path, char *buf, char **name, in d_namespace_path() argument
97 if (path->mnt->mnt_flags & MNT_INTERNAL) { in d_namespace_path()
99 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()
113 error = disconnect(path, buf, name, flags, in d_namespace_path()
120 struct path root; in d_namespace_path()
122 res = __d_path(path, &root, buf, buflen); in d_namespace_path()
125 res = d_absolute_path(path, buf, buflen); in d_namespace_path()
[all …]
Dmount.c293 static int path_flags(struct aa_profile *profile, const struct path *path) in path_flags() argument
296 AA_BUG(!path); in path_flags()
299 (S_ISDIR(path->dentry->d_inode->i_mode) ? PATH_IS_DIR : 0); in path_flags()
317 const struct path *mntpath, char *buffer, in match_mnt_path_str()
373 static int match_mnt(struct aa_profile *profile, const struct path *path, in match_mnt() argument
374 char *buffer, const struct path *devpath, char *devbuffer, in match_mnt()
395 return match_mnt_path_str(profile, path, buffer, devname, type, flags, in match_mnt()
399 int aa_remount(struct aa_label *label, const struct path *path, in aa_remount() argument
408 AA_BUG(!path); in aa_remount()
410 binary = path->dentry->d_sb->s_type->fs_flags & FS_BINARY_MOUNTDATA; in aa_remount()
[all …]
Dlsm.c203 static int common_perm(const char *op, const struct path *path, u32 mask, in common_perm() argument
211 error = aa_path_perm(op, label, path, 0, mask, cond); in common_perm()
225 static int common_perm_cond(const char *op, const struct path *path, u32 mask) in common_perm_cond() argument
227 struct user_namespace *mnt_userns = mnt_user_ns(path->mnt); in common_perm_cond()
229 i_uid_into_mnt(mnt_userns, d_backing_inode(path->dentry)), in common_perm_cond()
230 d_backing_inode(path->dentry)->i_mode in common_perm_cond()
233 if (!path_mediated_fs(path->dentry)) in common_perm_cond()
236 return common_perm(op, path, mask, &cond); in common_perm_cond()
249 static int common_perm_dir_dentry(const char *op, const struct path *dir, in common_perm_dir_dentry()
253 struct path path = { .mnt = dir->mnt, .dentry = dentry }; in common_perm_dir_dentry() local
[all …]
Dfile.c158 const struct path *path, int flags, char *buffer, in path_name() argument
165 error = aa_path_name(path, flags, buffer, name, &info, in path_name()
285 const struct path *path, char *buffer, u32 request, in profile_path_perm() argument
295 error = path_name(op, &profile->label, path, in profile_path_perm()
316 const struct path *path, int flags, u32 request, in aa_path_perm() argument
330 profile_path_perm(op, profile, path, buffer, request, in aa_path_perm()
359 const struct path *link, char *buffer, in profile_path_link()
360 const struct path *target, char *buffer2, in profile_path_link()
458 const struct path *new_dir, struct dentry *new_dentry) in aa_path_link()
460 struct path link = { .mnt = new_dir->mnt, .dentry = new_dentry }; in aa_path_link()
[all …]
/security/apparmor/include/
Dmount.h28 int aa_remount(struct aa_label *label, const struct path *path,
31 int aa_bind_mount(struct aa_label *label, const struct path *path,
35 int aa_mount_change_type(struct aa_label *label, const struct path *path,
38 int aa_move_mount(struct aa_label *label, const struct path *path,
42 const struct path *path, const char *type, unsigned long flags,
47 int aa_pivotroot(struct aa_label *label, const struct path *old_path,
48 const struct path *new_path);
Dpath.h24 int aa_path_name(const struct path *path, int flags, char *buffer,
Dfile.h21 struct path;
193 const struct path *path, int flags, u32 request,
197 const struct path *new_dir, struct dentry *new_dentry);
/security/keys/
Dbig_key.c58 struct path *path = (struct path *)&prep->payload.data[big_key_path]; in big_key_preparse() local
121 *path = file->f_path; in big_key_preparse()
122 path_get(path); in big_key_preparse()
152 struct path *path = (struct path *)&prep->payload.data[big_key_path]; in big_key_free_preparse() local
154 path_put(path); in big_key_free_preparse()
165 struct path *path = (struct path *)&key->payload.data[big_key_path]; in big_key_revoke() local
171 vfs_truncate(path, 0); in big_key_revoke()
182 struct path *path = (struct path *)&key->payload.data[big_key_path]; in big_key_destroy() local
184 path_put(path); in big_key_destroy()
185 path->mnt = NULL; in big_key_destroy()
[all …]
/security/landlock/
Dfs.c155 const struct path *const path, in landlock_append_fs_rule() argument
162 if (!d_is_dir(path->dentry) && in landlock_append_fs_rule()
170 object = get_inode_object(d_backing_inode(path->dentry)); in landlock_append_fs_rule()
265 const struct path *const path, in check_access_path() argument
270 struct path walker_path; in check_access_path()
275 if (WARN_ON_ONCE(!domain || !path)) in check_access_path()
282 if ((path->dentry->d_sb->s_flags & SB_NOUSER) || in check_access_path()
283 (d_is_positive(path->dentry) && in check_access_path()
284 unlikely(IS_PRIVATE(d_backing_inode(path->dentry))))) in check_access_path()
306 walker_path = *path; in check_access_path()
[all …]
Dsyscalls.c244 static int get_path_from_fd(const s32 fd, struct path *const path) in get_path_from_fd() argument
269 *path = f.file->f_path; in get_path_from_fd()
270 path_get(path); in get_path_from_fd()
310 struct path path; in SYSCALL_DEFINE4() local
358 err = get_path_from_fd(path_beneath_attr.parent_fd, &path); in SYSCALL_DEFINE4()
363 err = landlock_append_fs_rule(ruleset, &path, in SYSCALL_DEFINE4()
365 path_put(&path); in SYSCALL_DEFINE4()
Dfs.h68 const struct path *const path,
/security/
Dsecurity.c975 int security_sb_mount(const char *dev_name, const struct path *path, in security_sb_mount() argument
978 return call_int_hook(sb_mount, 0, dev_name, path, type, flags, data); in security_sb_mount()
986 int security_sb_pivotroot(const struct path *old_path, const struct path *new_path) in security_sb_pivotroot()
1020 int security_move_mount(const struct path *from_path, const struct path *to_path) in security_move_mount()
1025 int security_path_notify(const struct path *path, u64 mask, in security_path_notify() argument
1028 return call_int_hook(path_notify, 0, path, mask, obj_type); in security_path_notify()
1143 int security_path_mknod(const struct path *dir, struct dentry *dentry, umode_t mode, in security_path_mknod()
1152 int security_path_mkdir(const struct path *dir, struct dentry *dentry, umode_t mode) in security_path_mkdir()
1160 int security_path_rmdir(const struct path *dir, struct dentry *dentry) in security_path_rmdir()
1167 int security_path_unlink(const struct path *dir, struct dentry *dentry) in security_path_unlink()
[all …]
Dlsm_audit.c235 audit_log_d_path(ab, " path=", &a->u.path); in dump_common_audit_data()
237 inode = d_backing_inode(a->u.path.dentry); in dump_common_audit_data()
261 audit_log_d_path(ab, " path=", &a->u.op->path); in dump_common_audit_data()
263 inode = a->u.op->path.dentry->d_inode; in dump_common_audit_data()
359 if (u->path.dentry) { in dump_common_audit_data()
360 audit_log_d_path(ab, " path=", &u->path); in dump_common_audit_data()
/security/integrity/
Ddigsig.c177 int __init integrity_load_x509(const unsigned int id, const char *path) in integrity_load_x509() argument
184 rc = kernel_read_file_from_path(path, 0, &data, INT_MAX, NULL, in integrity_load_x509()
187 pr_err("Unable to open file: %s (%d)", path, rc); in integrity_load_x509()
194 pr_info("Loading X.509 certificate: %s\n", path); in integrity_load_x509()
/security/integrity/ima/
Dima_fs.c274 static ssize_t ima_read_policy(char *path) in ima_read_policy() argument
279 int rc, pathlen = strlen(path); in ima_read_policy()
284 datap = path; in ima_read_policy()
287 rc = kernel_read_file_from_path(path, 0, &data, INT_MAX, NULL, in ima_read_policy()
290 pr_err("Unable to open file: %s (%d)", path, rc); in ima_read_policy()
Dima_api.c396 const char *ima_d_path(const struct path *path, char **pathbuf, char *namebuf) in ima_d_path() argument
402 pathname = d_absolute_path(path, *pathbuf, PATH_MAX); in ima_d_path()
411 strlcpy(namebuf, path->dentry->d_name.name, NAME_MAX); in ima_d_path()
Dima_appraise.c598 char *path = NULL, *pathbuf = NULL; in validate_hash_algo() local
631 path = dentry_path(dentry, pathbuf, PATH_MAX); in validate_hash_algo()
633 integrity_audit_msg(AUDIT_INTEGRITY_DATA, d_inode(dentry), path, in validate_hash_algo()
/security/smack/
Dsmack.h492 struct path p) in smk_ad_setfield_u_fs_path()
494 a->a.u.path = p; in smk_ad_setfield_u_fs_path()
521 struct path p) in smk_ad_setfield_u_fs_path()
/security/integrity/evm/
DKconfig70 string "EVM X509 certificate path"
74 This option defines X509 certificate path.

12