Lines Matching refs:path

121 static int tomoyo_inode_getattr(const struct path *path)
123 return tomoyo_path_perm(TOMOYO_TYPE_GETATTR, path, NULL);
129 * @path: Pointer to "struct path".
133 static int tomoyo_path_truncate(const struct path *path)
135 return tomoyo_path_perm(TOMOYO_TYPE_TRUNCATE, path, NULL);
141 * @parent: Pointer to "struct path".
146 static int tomoyo_path_unlink(const struct path *parent, struct dentry *dentry)
148 struct path path = { .mnt = parent->mnt, .dentry = dentry };
150 return tomoyo_path_perm(TOMOYO_TYPE_UNLINK, &path, NULL);
156 * @parent: Pointer to "struct path".
162 static int tomoyo_path_mkdir(const struct path *parent, struct dentry *dentry,
165 struct path path = { .mnt = parent->mnt, .dentry = dentry };
167 return tomoyo_path_number_perm(TOMOYO_TYPE_MKDIR, &path,
174 * @parent: Pointer to "struct path".
179 static int tomoyo_path_rmdir(const struct path *parent, struct dentry *dentry)
181 struct path path = { .mnt = parent->mnt, .dentry = dentry };
183 return tomoyo_path_perm(TOMOYO_TYPE_RMDIR, &path, NULL);
189 * @parent: Pointer to "struct path".
195 static int tomoyo_path_symlink(const struct path *parent, struct dentry *dentry,
198 struct path path = { .mnt = parent->mnt, .dentry = dentry };
200 return tomoyo_path_perm(TOMOYO_TYPE_SYMLINK, &path, old_name);
206 * @parent: Pointer to "struct path".
213 static int tomoyo_path_mknod(const struct path *parent, struct dentry *dentry,
216 struct path path = { .mnt = parent->mnt, .dentry = dentry };
230 return tomoyo_mkdev_perm(type, &path, perm, dev);
240 return tomoyo_path_number_perm(type, &path, perm);
247 * @new_dir: Pointer to "struct path".
252 static int tomoyo_path_link(struct dentry *old_dentry, const struct path *new_dir,
255 struct path path1 = { .mnt = new_dir->mnt, .dentry = old_dentry };
256 struct path path2 = { .mnt = new_dir->mnt, .dentry = new_dentry };
264 * @old_parent: Pointer to "struct path".
266 * @new_parent: Pointer to "struct path".
271 static int tomoyo_path_rename(const struct path *old_parent,
273 const struct path *new_parent,
276 struct path path1 = { .mnt = old_parent->mnt, .dentry = old_dentry };
277 struct path path2 = { .mnt = new_parent->mnt, .dentry = new_dentry };
335 * @path: Pointer to "struct path".
340 static int tomoyo_path_chmod(const struct path *path, umode_t mode)
342 return tomoyo_path_number_perm(TOMOYO_TYPE_CHMOD, path,
349 * @path: Pointer to "struct path".
355 static int tomoyo_path_chown(const struct path *path, kuid_t uid, kgid_t gid)
360 error = tomoyo_path_number_perm(TOMOYO_TYPE_CHOWN, path,
363 error = tomoyo_path_number_perm(TOMOYO_TYPE_CHGRP, path,
371 * @path: Pointer to "struct path".
375 static int tomoyo_path_chroot(const struct path *path)
377 return tomoyo_path_perm(TOMOYO_TYPE_CHROOT, path, NULL);
384 * @path: Pointer to "struct path".
391 static int tomoyo_sb_mount(const char *dev_name, const struct path *path,
394 return tomoyo_mount_permission(dev_name, path, type, flags, data);
407 struct path path = { .mnt = mnt, .dentry = mnt->mnt_root };
409 return tomoyo_path_perm(TOMOYO_TYPE_UMOUNT, &path, NULL);
415 * @old_path: Pointer to "struct path".
416 * @new_path: Pointer to "struct path".
420 static int tomoyo_sb_pivotroot(const struct path *old_path, const struct path *new_path)