Home
last modified time | relevance | path

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

12

/security/tomoyo/
Dtomoyo.c127 static int tomoyo_inode_getattr(const struct path *path) in tomoyo_inode_getattr() argument
129 return tomoyo_path_perm(TOMOYO_TYPE_GETATTR, path, NULL); in tomoyo_inode_getattr()
139 static int tomoyo_path_truncate(const struct path *path) in tomoyo_path_truncate() argument
141 return tomoyo_path_perm(TOMOYO_TYPE_TRUNCATE, path, NULL); in tomoyo_path_truncate()
152 static int tomoyo_path_unlink(const struct path *parent, struct dentry *dentry) in tomoyo_path_unlink()
154 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_unlink() local
156 return tomoyo_path_perm(TOMOYO_TYPE_UNLINK, &path, NULL); in tomoyo_path_unlink()
168 static int tomoyo_path_mkdir(const struct path *parent, struct dentry *dentry, in tomoyo_path_mkdir()
171 struct path path = { .mnt = parent->mnt, .dentry = dentry }; in tomoyo_path_mkdir() local
173 return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path, in tomoyo_path_mkdir()
[all …]
Drealpath.c93 static char *tomoyo_get_absolute_path(const struct path *path, char * const buffer, in tomoyo_get_absolute_path() argument
100 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path()
102 struct inode *inode = d_backing_inode(path->dentry); in tomoyo_get_absolute_path()
235 char *tomoyo_realpath_from_path(const struct path *path) in tomoyo_realpath_from_path() argument
240 struct dentry *dentry = path->dentry; in tomoyo_realpath_from_path()
267 if (!path->mnt || in tomoyo_realpath_from_path()
270 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
274 pos = tomoyo_get_absolute_path(path, buf, buf_len - 1); in tomoyo_realpath_from_path()
280 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
304 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, 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.c193 static int common_perm(const char *op, const struct path *path, u32 mask, in common_perm() argument
201 error = aa_path_perm(op, label, path, 0, mask, cond); in common_perm()
215 static int common_perm_cond(const char *op, const struct path *path, u32 mask) in common_perm_cond() argument
217 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()
224 return common_perm(op, path, mask, &cond); in common_perm_cond()
237 static int common_perm_dir_dentry(const char *op, const struct path *dir, in common_perm_dir_dentry()
241 struct path path = { .mnt = dir->mnt, .dentry = dentry }; in common_perm_dir_dentry() local
243 return common_perm(op, &path, mask, cond); in common_perm_dir_dentry()
[all …]
Dfile.c167 const struct path *path, int flags, char *buffer, in path_name() argument
174 error = aa_path_name(path, flags, buffer, name, &info, in path_name()
294 const struct path *path, char *buffer, u32 request, in profile_path_perm() argument
304 error = path_name(op, &profile->label, path, in profile_path_perm()
325 const struct path *path, int flags, u32 request, in aa_path_perm() argument
337 profile_path_perm(op, profile, path, buffer, request, in aa_path_perm()
366 const struct path *link, char *buffer, in profile_path_link()
367 const struct path *target, char *buffer2, in profile_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()
[all …]
DMakefile7 path.o domain.o policy.o policy_unpack.o procattr.o lsm.o \
/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);
Dfile.h21 struct path;
193 const struct path *path, int flags, u32 request,
197 const struct path *new_dir, struct dentry *new_dentry);
Dpath.h25 int aa_path_name(const struct path *path, int flags, char *buffer,
Dapparmorfs.h14 extern struct path aa_null;
/security/keys/
Dbig_key.c203 struct path *path = (struct path *)&prep->payload.data[big_key_path]; in big_key_preparse() local
265 *path = file->f_path; in big_key_preparse()
266 path_get(path); in big_key_preparse()
296 struct path *path = (struct path *)&prep->payload.data[big_key_path]; in big_key_free_preparse() local
298 path_put(path); in big_key_free_preparse()
309 struct path *path = (struct path *)&key->payload.data[big_key_path]; in big_key_revoke() local
315 vfs_truncate(path, 0); in big_key_revoke()
326 struct path *path = (struct path *)&key->payload.data[big_key_path]; in big_key_destroy() local
328 path_put(path); in big_key_destroy()
329 path->mnt = NULL; in big_key_destroy()
[all …]
/security/
Dsecurity.c870 int security_sb_mount(const char *dev_name, const struct path *path, in security_sb_mount() argument
873 return call_int_hook(sb_mount, 0, dev_name, path, type, flags, data); in security_sb_mount()
881 int security_sb_pivotroot(const struct path *old_path, const struct path *new_path) in security_sb_pivotroot()
915 int security_move_mount(const struct path *from_path, const struct path *to_path) in security_move_mount()
920 int security_path_notify(const struct path *path, u64 mask, in security_path_notify() argument
923 return call_int_hook(path_notify, 0, path, mask, obj_type); in security_path_notify()
1029 int security_path_mknod(const struct path *dir, struct dentry *dentry, umode_t mode, in security_path_mknod()
1038 int security_path_mkdir(const struct path *dir, struct dentry *dentry, umode_t mode) in security_path_mkdir()
1046 int security_path_rmdir(const struct path *dir, struct dentry *dentry) in security_path_rmdir()
1053 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()
358 if (u->path.dentry) { in dump_common_audit_data()
359 audit_log_d_path(ab, " path=", &u->path); in dump_common_audit_data()
/security/integrity/
Ddigsig.c176 int __init integrity_load_x509(const unsigned int id, const char *path) in integrity_load_x509() argument
183 rc = kernel_read_file_from_path(path, &data, &size, 0, in integrity_load_x509()
186 pr_err("Unable to open file: %s (%d)", path, rc); in integrity_load_x509()
192 pr_info("Loading X.509 certificate: %s\n", path); in integrity_load_x509()
/security/integrity/ima/
Dima_fs.c275 static ssize_t ima_read_policy(char *path) in ima_read_policy() argument
280 int rc, pathlen = strlen(path); in ima_read_policy()
285 datap = path; in ima_read_policy()
288 rc = kernel_read_file_from_path(path, &data, &size, 0, READING_POLICY); in ima_read_policy()
290 pr_err("Unable to open file: %s (%d)", path, rc); in ima_read_policy()
Dima_api.c389 const char *ima_d_path(const struct path *path, char **pathbuf, char *namebuf) in ima_d_path() argument
395 pathname = d_absolute_path(path, *pathbuf, PATH_MAX); in ima_d_path()
404 strlcpy(namebuf, path->dentry->d_name.name, NAME_MAX); in ima_d_path()
Dima.h231 const char *ima_d_path(const struct path *path, char **pathbuf, char *filename);
/security/smack/
Dsmack.h479 struct path p) in smk_ad_setfield_u_fs_path()
481 a->a.u.path = p; in smk_ad_setfield_u_fs_path()
512 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.
/security/selinux/
Dhooks.c1349 char *buffer, *path; in selinux_genfs_get_sid() local
1355 path = dentry_path_raw(dentry, buffer, PAGE_SIZE); in selinux_genfs_get_sid()
1356 if (IS_ERR(path)) in selinux_genfs_get_sid()
1357 rc = PTR_ERR(path); in selinux_genfs_get_sid()
1363 while (path[1] >= '0' && path[1] <= '9') { in selinux_genfs_get_sid()
1364 path[1] = '/'; in selinux_genfs_get_sid()
1365 path++; in selinux_genfs_get_sid()
1369 path, tclass, sid); in selinux_genfs_get_sid()
1729 const struct path *path, in path_has_perm() argument
1732 struct inode *inode = d_backing_inode(path->dentry); in path_has_perm()
[all …]

12