Lines Matching refs:path

218 static int common_perm(const char *op, const struct path *path, u32 mask,  in common_perm()  argument
227 error = aa_path_perm(op, current_cred(), label, path, 0, mask, in common_perm()
242 static int common_perm_cond(const char *op, const struct path *path, u32 mask) in common_perm_cond() argument
244 vfsuid_t vfsuid = i_uid_into_vfsuid(mnt_idmap(path->mnt), in common_perm_cond()
245 d_backing_inode(path->dentry)); in common_perm_cond()
248 d_backing_inode(path->dentry)->i_mode in common_perm_cond()
251 if (!path_mediated_fs(path->dentry)) in common_perm_cond()
254 return common_perm(op, path, mask, &cond); in common_perm_cond()
267 static int common_perm_dir_dentry(const char *op, const struct path *dir, in common_perm_dir_dentry()
271 struct path path = { .mnt = dir->mnt, .dentry = dentry }; in common_perm_dir_dentry() local
273 return common_perm(op, &path, mask, cond); in common_perm_dir_dentry()
285 static int common_perm_rm(const char *op, const struct path *dir, in common_perm_rm()
312 static int common_perm_create(const char *op, const struct path *dir, in common_perm_create()
323 static int apparmor_path_unlink(const struct path *dir, struct dentry *dentry) in apparmor_path_unlink()
328 static int apparmor_path_mkdir(const struct path *dir, struct dentry *dentry, in apparmor_path_mkdir()
335 static int apparmor_path_rmdir(const struct path *dir, struct dentry *dentry) in apparmor_path_rmdir()
340 static int apparmor_path_mknod(const struct path *dir, struct dentry *dentry, in apparmor_path_mknod()
346 static int apparmor_path_truncate(const struct path *path) in apparmor_path_truncate() argument
348 return common_perm_cond(OP_TRUNC, path, MAY_WRITE | AA_MAY_SETATTR); in apparmor_path_truncate()
356 static int apparmor_path_symlink(const struct path *dir, struct dentry *dentry, in apparmor_path_symlink()
363 static int apparmor_path_link(struct dentry *old_dentry, const struct path *new_dir, in apparmor_path_link()
381 static int apparmor_path_rename(const struct path *old_dir, struct dentry *old_dentry, in apparmor_path_rename()
382 const struct path *new_dir, struct dentry *new_dentry, in apparmor_path_rename()
397 struct path old_path = { .mnt = old_dir->mnt, in apparmor_path_rename()
399 struct path new_path = { .mnt = new_dir->mnt, in apparmor_path_rename()
444 static int apparmor_path_chmod(const struct path *path, umode_t mode) in apparmor_path_chmod() argument
446 return common_perm_cond(OP_CHMOD, path, AA_MAY_CHMOD); in apparmor_path_chmod()
449 static int apparmor_path_chown(const struct path *path, kuid_t uid, kgid_t gid) in apparmor_path_chown() argument
451 return common_perm_cond(OP_CHOWN, path, AA_MAY_CHOWN); in apparmor_path_chown()
454 static int apparmor_inode_getattr(const struct path *path) in apparmor_inode_getattr() argument
456 return common_perm_cond(OP_GETATTR, path, AA_MAY_GETATTR); in apparmor_inode_getattr()
707 static int apparmor_sb_mount(const char *dev_name, const struct path *path, in apparmor_sb_mount() argument
723 error = aa_remount(current_cred(), label, path, flags, in apparmor_sb_mount()
726 error = aa_bind_mount(current_cred(), label, path, in apparmor_sb_mount()
731 path, flags); in apparmor_sb_mount()
733 error = aa_move_mount_old(current_cred(), label, path, in apparmor_sb_mount()
737 path, type, flags, data); in apparmor_sb_mount()
744 static int apparmor_move_mount(const struct path *from_path, in apparmor_move_mount()
745 const struct path *to_path) in apparmor_move_mount()
774 static int apparmor_sb_pivotroot(const struct path *old_path, in apparmor_sb_pivotroot()
775 const struct path *new_path) in apparmor_sb_pivotroot()