Lines Matching refs:path

116  * @path: Pointer to "struct path".
120 static int tomoyo_inode_getattr(const struct path *path)
122 return tomoyo_path_perm(TOMOYO_TYPE_GETATTR, path, NULL);
128 * @path: Pointer to "struct path".
132 static int tomoyo_path_truncate(const struct path *path)
134 return tomoyo_path_perm(TOMOYO_TYPE_TRUNCATE, path, NULL);
152 * @parent: Pointer to "struct path".
157 static int tomoyo_path_unlink(const struct path *parent, struct dentry *dentry)
159 struct path path = { .mnt = parent->mnt, .dentry = dentry };
161 return tomoyo_path_perm(TOMOYO_TYPE_UNLINK, &path, NULL);
167 * @parent: Pointer to "struct path".
173 static int tomoyo_path_mkdir(const struct path *parent, struct dentry *dentry,
176 struct path path = { .mnt = parent->mnt, .dentry = dentry };
178 return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path,
185 * @parent: Pointer to "struct path".
190 static int tomoyo_path_rmdir(const struct path *parent, struct dentry *dentry)
192 struct path path = { .mnt = parent->mnt, .dentry = dentry };
194 return tomoyo_path_perm(TOMOYO_TYPE_RMDIR, &path, NULL);
200 * @parent: Pointer to "struct path".
206 static int tomoyo_path_symlink(const struct path *parent, struct dentry *dentry,
209 struct path path = { .mnt = parent->mnt, .dentry = dentry };
211 return tomoyo_path_perm(TOMOYO_TYPE_SYMLINK, &path, old_name);
217 * @parent: Pointer to "struct path".
224 static int tomoyo_path_mknod(const struct path *parent, struct dentry *dentry,
227 struct path path = { .mnt = parent->mnt, .dentry = dentry };
241 return tomoyo_mkdev_perm(type, &path, perm, dev);
251 return tomoyo_path_number_perm(type, &path, perm);
258 * @new_dir: Pointer to "struct path".
263 static int tomoyo_path_link(struct dentry *old_dentry, const struct path *new_dir,
266 struct path path1 = { .mnt = new_dir->mnt, .dentry = old_dentry };
267 struct path path2 = { .mnt = new_dir->mnt, .dentry = new_dentry };
275 * @old_parent: Pointer to "struct path".
277 * @new_parent: Pointer to "struct path".
283 static int tomoyo_path_rename(const struct path *old_parent,
285 const struct path *new_parent,
289 struct path path1 = { .mnt = old_parent->mnt, .dentry = old_dentry };
290 struct path path2 = { .mnt = new_parent->mnt, .dentry = new_dentry };
354 * @path: Pointer to "struct path".
359 static int tomoyo_path_chmod(const struct path *path, umode_t mode)
361 return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, path,
368 * @path: Pointer to "struct path".
374 static int tomoyo_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
379 error = tomoyo_path_number_perm(TOMOYO_TYPE_CHOWN, path,
382 error = tomoyo_path_number_perm(TOMOYO_TYPE_CHGRP, path,
390 * @path: Pointer to "struct path".
394 static int tomoyo_path_chroot(const struct path *path)
396 return tomoyo_path_perm(TOMOYO_TYPE_CHROOT, path, NULL);
403 * @path: Pointer to "struct path".
410 static int tomoyo_sb_mount(const char *dev_name, const struct path *path,
413 return tomoyo_mount_permission(dev_name, path, type, flags, data);
426 struct path path = { .mnt = mnt, .dentry = mnt->mnt_root };
428 return tomoyo_path_perm(TOMOYO_TYPE_UMOUNT, &path, NULL);
434 * @old_path: Pointer to "struct path".
435 * @new_path: Pointer to "struct path".
439 static int tomoyo_sb_pivotroot(const struct path *old_path, const struct path *new_path)