• Home
  • Raw
  • Download

Lines Matching refs:path

193 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()
255 static int common_perm_rm(const char *op, const struct path *dir, in common_perm_rm()
280 static int common_perm_create(const char *op, const struct path *dir, in common_perm_create()
291 static int apparmor_path_unlink(const struct path *dir, struct dentry *dentry) in apparmor_path_unlink()
296 static int apparmor_path_mkdir(const struct path *dir, struct dentry *dentry, in apparmor_path_mkdir()
303 static int apparmor_path_rmdir(const struct path *dir, struct dentry *dentry) in apparmor_path_rmdir()
308 static int apparmor_path_mknod(const struct path *dir, struct dentry *dentry, in apparmor_path_mknod()
314 static int apparmor_path_truncate(const struct path *path) in apparmor_path_truncate() argument
316 return common_perm_cond(OP_TRUNC, path, MAY_WRITE | AA_MAY_SETATTR); in apparmor_path_truncate()
319 static int apparmor_path_symlink(const struct path *dir, struct dentry *dentry, in apparmor_path_symlink()
326 static int apparmor_path_link(struct dentry *old_dentry, const struct path *new_dir, in apparmor_path_link()
343 static int apparmor_path_rename(const struct path *old_dir, struct dentry *old_dentry, in apparmor_path_rename()
344 const struct path *new_dir, struct dentry *new_dentry) in apparmor_path_rename()
354 struct path old_path = { .mnt = old_dir->mnt, in apparmor_path_rename()
356 struct path new_path = { .mnt = new_dir->mnt, in apparmor_path_rename()
377 static int apparmor_path_chmod(const struct path *path, umode_t mode) in apparmor_path_chmod() argument
379 return common_perm_cond(OP_CHMOD, path, AA_MAY_CHMOD); in apparmor_path_chmod()
382 static int apparmor_path_chown(const struct path *path, kuid_t uid, kgid_t gid) in apparmor_path_chown() argument
384 return common_perm_cond(OP_CHOWN, path, AA_MAY_CHOWN); in apparmor_path_chown()
387 static int apparmor_inode_getattr(const struct path *path) in apparmor_inode_getattr() argument
389 return common_perm_cond(OP_GETATTR, path, AA_MAY_GETATTR); in apparmor_inode_getattr()
516 static int apparmor_sb_mount(const char *dev_name, const struct path *path, in apparmor_sb_mount() argument
531 error = aa_remount(label, path, flags, data); in apparmor_sb_mount()
533 error = aa_bind_mount(label, path, dev_name, flags); in apparmor_sb_mount()
536 error = aa_mount_change_type(label, path, flags); in apparmor_sb_mount()
538 error = aa_move_mount(label, path, dev_name); in apparmor_sb_mount()
540 error = aa_new_mount(label, dev_name, path, type, in apparmor_sb_mount()
561 static int apparmor_sb_pivotroot(const struct path *old_path, in apparmor_sb_pivotroot()
562 const struct path *new_path) in apparmor_sb_pivotroot()