Home
last modified time | relevance | path

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

12

/security/tomoyo/
Dtomoyo.c149 struct path path = { mnt, dentry }; in tomoyo_inode_getattr() local
150 return tomoyo_path_perm(TOMOYO_TYPE_GETATTR, &path, NULL); in tomoyo_inode_getattr()
160 static int tomoyo_path_truncate(struct path *path) in tomoyo_path_truncate() argument
162 return tomoyo_path_perm(TOMOYO_TYPE_TRUNCATE, path, NULL); in tomoyo_path_truncate()
173 static int tomoyo_path_unlink(struct path *parent, struct dentry *dentry) in tomoyo_path_unlink()
175 struct path path = { parent->mnt, dentry }; in tomoyo_path_unlink() local
176 return tomoyo_path_perm(TOMOYO_TYPE_UNLINK, &path, NULL); in tomoyo_path_unlink()
188 static int tomoyo_path_mkdir(struct path *parent, struct dentry *dentry, in tomoyo_path_mkdir()
191 struct path path = { parent->mnt, dentry }; in tomoyo_path_mkdir() local
192 return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path, in tomoyo_path_mkdir()
[all …]
Drealpath.c92 static char *tomoyo_get_absolute_path(struct path *path, char * const buffer, in tomoyo_get_absolute_path() argument
98 pos = d_absolute_path(path, buffer, buflen - 1); in tomoyo_get_absolute_path()
100 struct inode *inode = path->dentry->d_inode; in tomoyo_get_absolute_path()
219 static char *tomoyo_get_socket_name(struct path *path, char * const buffer, in tomoyo_get_socket_name() argument
222 struct inode *inode = path->dentry->d_inode; in tomoyo_get_socket_name()
250 char *tomoyo_realpath_from_path(struct path *path) in tomoyo_realpath_from_path() argument
255 struct dentry *dentry = path->dentry; in tomoyo_realpath_from_path()
272 pos = tomoyo_get_socket_name(path, buf, buf_len - 1); in tomoyo_realpath_from_path()
285 if (!path->mnt || in tomoyo_realpath_from_path()
287 pos = tomoyo_get_local_path(path->dentry, buf, in tomoyo_realpath_from_path()
[all …]
Dfile.c148 static bool tomoyo_get_realpath(struct tomoyo_path_info *buf, struct path *path) in tomoyo_get_realpath() argument
150 buf->name = tomoyo_realpath_from_path(path); in tomoyo_get_realpath()
168 [r->param.path.operation], in tomoyo_audit_path_log()
169 r->param.path.filename->name); in tomoyo_audit_path_log()
255 if (acl->perm & (1 << r->param.path.operation)) { in tomoyo_check_path_acl()
256 r->param.path.matched_path = in tomoyo_check_path_acl()
257 tomoyo_compare_name_union(r->param.path.filename, in tomoyo_check_path_acl()
259 return r->param.path.matched_path != NULL; in tomoyo_check_path_acl()
568 r->param.path.filename = filename; in tomoyo_path_permission()
569 r->param.path.operation = operation; in tomoyo_path_permission()
[all …]
Dmount.c76 struct path *dir, const char *type, in tomoyo_mount_acl()
80 struct path path; in tomoyo_mount_acl() local
132 if (!dev_name || kern_path(dev_name, LOOKUP_FOLLOW, &path)) { in tomoyo_mount_acl()
136 obj.path1 = path; in tomoyo_mount_acl()
137 requested_dev_name = tomoyo_realpath_from_path(&path); in tomoyo_mount_acl()
187 int tomoyo_mount_permission(const char *dev_name, struct path *path, in tomoyo_mount_permission() argument
233 error = tomoyo_mount_acl(&r, dev_name, path, type, flags); in tomoyo_mount_permission()
Dload_policy.c38 struct path path; in tomoyo_policy_loader_exists() local
41 if (kern_path(tomoyo_loader, LOOKUP_FOLLOW, &path)) { in tomoyo_policy_loader_exists()
46 path_put(&path); in tomoyo_policy_loader_exists()
Dcommon.h436 } path; member
587 struct path path1;
589 struct path path2;
948 char *tomoyo_realpath_from_path(struct path *path);
960 struct path *path, const int flag);
971 int tomoyo_mkdev_perm(const u8 operation, struct path *path,
973 int tomoyo_mount_permission(const char *dev_name, struct path *path,
977 int tomoyo_path2_perm(const u8 operation, struct path *path1,
978 struct path *path2);
979 int tomoyo_path_number_perm(const u8 operation, struct path *path,
[all …]
Ddomain.c736 if (ee->r.param.path.matched_path) in tomoyo_find_next_domain()
737 candidate = ee->r.param.path.matched_path; in tomoyo_find_next_domain()
/security/keys/
Dbig_key.c50 struct path *path = (struct path *)&prep->payload; in big_key_preparse() local
88 *path = file->f_path; in big_key_preparse()
89 path_get(path); in big_key_preparse()
113 struct path *path = (struct path *)&prep->payload; in big_key_free_preparse() local
114 path_put(path); in big_key_free_preparse()
126 struct path *path = (struct path *)&key->payload.data2; in big_key_revoke() local
131 vfs_truncate(path, 0); in big_key_revoke()
140 struct path *path = (struct path *)&key->payload.data2; in big_key_destroy() local
141 path_put(path); in big_key_destroy()
142 path->mnt = NULL; in big_key_destroy()
[all …]
Drequest_key.c75 static int call_usermodehelper_keys(char *path, char **argv, char **envp, in call_usermodehelper_keys() argument
80 info = call_usermodehelper_setup(path, argv, envp, GFP_KERNEL, in call_usermodehelper_keys()
/security/apparmor/
Dpath.c56 static int d_namespace_path(struct path *path, char *buf, int buflen, in d_namespace_path() argument
63 if (path->mnt->mnt_flags & MNT_INTERNAL) { in d_namespace_path()
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()
83 struct path root; in d_namespace_path()
85 res = __d_path(path, &root, buf, buflen); in d_namespace_path()
88 res = d_absolute_path(path, buf, buflen); in d_namespace_path()
89 if (!our_mnt(path->mnt)) in d_namespace_path()
100 res = dentry_path_raw(path->dentry, buf, buflen); in d_namespace_path()
106 } else if (!our_mnt(path->mnt)) in d_namespace_path()
[all …]
Dlsm.c162 static int common_perm(int op, struct path *path, u32 mask, in common_perm() argument
170 error = aa_path_perm(op, profile, path, 0, mask, cond); in common_perm()
185 static int common_perm_dir_dentry(int op, struct path *dir, in common_perm_dir_dentry()
189 struct path path = { dir->mnt, dentry }; in common_perm_dir_dentry() local
191 return common_perm(op, &path, mask, cond); in common_perm_dir_dentry()
206 struct path path = { mnt, dentry }; in common_perm_mnt_dentry() local
211 return common_perm(op, &path, mask, &cond); in common_perm_mnt_dentry()
223 static int common_perm_rm(int op, struct path *dir, in common_perm_rm()
248 static int common_perm_create(int op, struct path *dir, struct dentry *dentry, in common_perm_create()
259 static int apparmor_path_unlink(struct path *dir, struct dentry *dentry) in apparmor_path_unlink()
[all …]
Dfile.c278 int aa_path_perm(int op, struct aa_profile *profile, struct path *path, in aa_path_perm() argument
287 error = aa_path_name(path, flags, &buffer, &name, &info); in aa_path_perm()
289 if (error == -ENOENT && is_deleted(path->dentry)) { in aa_path_perm()
349 struct path *new_dir, struct dentry *new_dentry) in aa_path_link()
351 struct path link = { new_dir->mnt, new_dentry }; in aa_path_link()
352 struct path target = { new_dir->mnt, old_dentry }; in aa_path_link()
DMakefile6 path.o domain.o policy.o policy_unpack.o procattr.o lsm.o \
/security/
Dcapability.c97 static int cap_sb_mount(const char *dev_name, struct path *path, in cap_sb_mount() argument
108 static int cap_sb_pivotroot(struct path *old_path, struct path *new_path) in cap_sb_pivotroot()
269 static int cap_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, in cap_path_mknod()
275 static int cap_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode) in cap_path_mkdir()
280 static int cap_path_rmdir(struct path *dir, struct dentry *dentry) in cap_path_rmdir()
285 static int cap_path_unlink(struct path *dir, struct dentry *dentry) in cap_path_unlink()
290 static int cap_path_symlink(struct path *dir, struct dentry *dentry, in cap_path_symlink()
296 static int cap_path_link(struct dentry *old_dentry, struct path *new_dir, in cap_path_link()
302 static int cap_path_rename(struct path *old_path, struct dentry *old_dentry, in cap_path_rename()
303 struct path *new_path, struct dentry *new_dentry) in cap_path_rename()
[all …]
Dsecurity.c300 int security_sb_mount(const char *dev_name, struct path *path, in security_sb_mount() argument
303 return security_ops->sb_mount(dev_name, path, type, flags, data); in security_sb_mount()
311 int security_sb_pivotroot(struct path *old_path, struct path *new_path) in security_sb_pivotroot()
407 int security_path_mknod(struct path *dir, struct dentry *dentry, umode_t mode, in security_path_mknod()
416 int security_path_mkdir(struct path *dir, struct dentry *dentry, umode_t mode) in security_path_mkdir()
424 int security_path_rmdir(struct path *dir, struct dentry *dentry) in security_path_rmdir()
431 int security_path_unlink(struct path *dir, struct dentry *dentry) in security_path_unlink()
439 int security_path_symlink(struct path *dir, struct dentry *dentry, in security_path_symlink()
447 int security_path_link(struct dentry *old_dentry, struct path *new_dir, in security_path_link()
455 int security_path_rename(struct path *old_dir, struct dentry *old_dentry, in security_path_rename()
[all …]
Dlsm_audit.c238 audit_log_d_path(ab, " path=", &a->u.path); in dump_common_audit_data()
240 inode = a->u.path.dentry->d_inode; in dump_common_audit_data()
251 audit_log_d_path(ab, " path=", &a->u.op->path); in dump_common_audit_data()
253 inode = a->u.op->path.dentry->d_inode; in dump_common_audit_data()
338 if (u->path.dentry) { in dump_common_audit_data()
339 audit_log_d_path(ab, " path=", &u->path); in dump_common_audit_data()
/security/apparmor/include/
Dpath.h29 int aa_path_name(struct path *path, int flags, char **buffer,
Dfile.h22 struct path;
174 int aa_path_perm(int op, struct aa_profile *profile, struct path *path,
178 struct path *new_dir, struct dentry *new_dentry);
/security/integrity/ima/
Dima_api.c324 const char *ima_d_path(struct path *path, char **pathbuf) in ima_d_path() argument
330 pathname = d_absolute_path(path, *pathbuf, PATH_MAX); in ima_d_path()
337 return pathname ?: (const char *)path->dentry->d_name.name; in ima_d_path()
Dima.h150 const char *ima_d_path(struct path *path, char **pathbuf);
/security/smack/
Dsmack.h393 struct path p) in smk_ad_setfield_u_fs_path()
395 a->a.u.path = p; in smk_ad_setfield_u_fs_path()
426 struct path p) in smk_ad_setfield_u_fs_path()
Dsmack_lsm.c1031 struct path path; in smack_inode_getattr() local
1034 path.dentry = dentry; in smack_inode_getattr()
1035 path.mnt = mnt; in smack_inode_getattr()
1038 smk_ad_setfield_u_fs_path(&ad, path); in smack_inode_getattr()
/security/selinux/
Dhooks.c1245 char *buffer, *path; in selinux_genfs_get_sid() local
1251 path = dentry_path_raw(dentry, buffer, PAGE_SIZE); in selinux_genfs_get_sid()
1252 if (IS_ERR(path)) in selinux_genfs_get_sid()
1253 rc = PTR_ERR(path); in selinux_genfs_get_sid()
1259 while (path[1] >= '0' && path[1] <= '9') { in selinux_genfs_get_sid()
1260 path[1] = '/'; in selinux_genfs_get_sid()
1261 path++; in selinux_genfs_get_sid()
1264 rc = security_genfs_sid(sb->s_type->name, path, tclass, sid); in selinux_genfs_get_sid()
1636 struct path *path, in path_has_perm() argument
1639 struct inode *inode = path->dentry->d_inode; in path_has_perm()
[all …]
/security/selinux/include/
Dsecurity.h260 extern struct path selinux_null;
/security/selinux/ss/
Dservices.c2466 char *path, in __security_genfs_sid() argument
2476 while (path[0] == '/' && path[1] == '/') in __security_genfs_sid()
2477 path++; in __security_genfs_sid()
2495 (strncmp(c->u.name, path, len) == 0)) in __security_genfs_sid()
2526 char *path, in security_genfs_sid() argument
2533 retval = __security_genfs_sid(fstype, path, orig_sclass, sid); in security_genfs_sid()

12