Lines Matching refs:path
152 static int common_perm(int op, struct path *path, u32 mask, in common_perm() argument
160 error = aa_path_perm(op, profile, path, 0, mask, cond); in common_perm()
175 static int common_perm_dir_dentry(int op, struct path *dir, in common_perm_dir_dentry()
179 struct path path = { dir->mnt, dentry }; in common_perm_dir_dentry() local
181 return common_perm(op, &path, mask, cond); in common_perm_dir_dentry()
196 struct path path = { mnt, dentry }; in common_perm_mnt_dentry() local
201 return common_perm(op, &path, mask, &cond); in common_perm_mnt_dentry()
213 static int common_perm_rm(int op, struct path *dir, in common_perm_rm()
238 static int common_perm_create(int op, struct path *dir, struct dentry *dentry, in common_perm_create()
249 static int apparmor_path_unlink(struct path *dir, struct dentry *dentry) in apparmor_path_unlink()
254 static int apparmor_path_mkdir(struct path *dir, struct dentry *dentry, in apparmor_path_mkdir()
261 static int apparmor_path_rmdir(struct path *dir, struct dentry *dentry) in apparmor_path_rmdir()
266 static int apparmor_path_mknod(struct path *dir, struct dentry *dentry, in apparmor_path_mknod()
272 static int apparmor_path_truncate(struct path *path) in apparmor_path_truncate() argument
274 struct path_cond cond = { d_backing_inode(path->dentry)->i_uid, in apparmor_path_truncate()
275 d_backing_inode(path->dentry)->i_mode in apparmor_path_truncate()
278 if (!path->mnt || !mediated_filesystem(path->dentry)) in apparmor_path_truncate()
281 return common_perm(OP_TRUNC, path, MAY_WRITE | AA_MAY_META_WRITE, in apparmor_path_truncate()
285 static int apparmor_path_symlink(struct path *dir, struct dentry *dentry, in apparmor_path_symlink()
292 static int apparmor_path_link(struct dentry *old_dentry, struct path *new_dir, in apparmor_path_link()
307 static int apparmor_path_rename(struct path *old_dir, struct dentry *old_dentry, in apparmor_path_rename()
308 struct path *new_dir, struct dentry *new_dentry) in apparmor_path_rename()
318 struct path old_path = { old_dir->mnt, old_dentry }; in apparmor_path_rename()
319 struct path new_path = { new_dir->mnt, new_dentry }; in apparmor_path_rename()
337 static int apparmor_path_chmod(struct path *path, umode_t mode) in apparmor_path_chmod() argument
339 if (!mediated_filesystem(path->dentry)) in apparmor_path_chmod()
342 return common_perm_mnt_dentry(OP_CHMOD, path->mnt, path->dentry, AA_MAY_CHMOD); in apparmor_path_chmod()
345 static int apparmor_path_chown(struct path *path, kuid_t uid, kgid_t gid) in apparmor_path_chown() argument
347 struct path_cond cond = { d_backing_inode(path->dentry)->i_uid, in apparmor_path_chown()
348 d_backing_inode(path->dentry)->i_mode in apparmor_path_chown()
351 if (!mediated_filesystem(path->dentry)) in apparmor_path_chown()
354 return common_perm(OP_CHOWN, path, AA_MAY_CHOWN, &cond); in apparmor_path_chown()
357 static int apparmor_inode_getattr(const struct path *path) in apparmor_inode_getattr() argument
359 if (!mediated_filesystem(path->dentry)) in apparmor_inode_getattr()
362 return common_perm_mnt_dentry(OP_GETATTR, path->mnt, path->dentry, in apparmor_inode_getattr()