Lines Matching refs:path
162 static int common_perm(int op, struct path *path, u32 mask, in common_perm() argument
170 error = aa_path_perm(op, profile, path, 0, mask, cond); in common_perm()
185 static int common_perm_dir_dentry(int op, struct path *dir, in common_perm_dir_dentry()
189 struct path path = { dir->mnt, dentry }; in common_perm_dir_dentry() local
191 return common_perm(op, &path, mask, cond); in common_perm_dir_dentry()
206 struct path path = { mnt, dentry }; in common_perm_mnt_dentry() local
211 return common_perm(op, &path, mask, &cond); in common_perm_mnt_dentry()
223 static int common_perm_rm(int op, struct path *dir, in common_perm_rm()
248 static int common_perm_create(int op, struct path *dir, struct dentry *dentry, in common_perm_create()
259 static int apparmor_path_unlink(struct path *dir, struct dentry *dentry) in apparmor_path_unlink()
264 static int apparmor_path_mkdir(struct path *dir, struct dentry *dentry, in apparmor_path_mkdir()
271 static int apparmor_path_rmdir(struct path *dir, struct dentry *dentry) in apparmor_path_rmdir()
276 static int apparmor_path_mknod(struct path *dir, struct dentry *dentry, in apparmor_path_mknod()
282 static int apparmor_path_truncate(struct path *path) in apparmor_path_truncate() argument
284 struct path_cond cond = { path->dentry->d_inode->i_uid, in apparmor_path_truncate()
285 path->dentry->d_inode->i_mode in apparmor_path_truncate()
288 if (!path->mnt || !mediated_filesystem(path->dentry->d_inode)) in apparmor_path_truncate()
291 return common_perm(OP_TRUNC, path, MAY_WRITE | AA_MAY_META_WRITE, in apparmor_path_truncate()
295 static int apparmor_path_symlink(struct path *dir, struct dentry *dentry, in apparmor_path_symlink()
302 static int apparmor_path_link(struct dentry *old_dentry, struct path *new_dir, in apparmor_path_link()
317 static int apparmor_path_rename(struct path *old_dir, struct dentry *old_dentry, in apparmor_path_rename()
318 struct path *new_dir, struct dentry *new_dentry) in apparmor_path_rename()
328 struct path old_path = { old_dir->mnt, old_dentry }; in apparmor_path_rename()
329 struct path new_path = { new_dir->mnt, new_dentry }; in apparmor_path_rename()
347 static int apparmor_path_chmod(struct path *path, umode_t mode) in apparmor_path_chmod() argument
349 if (!mediated_filesystem(path->dentry->d_inode)) in apparmor_path_chmod()
352 return common_perm_mnt_dentry(OP_CHMOD, path->mnt, path->dentry, AA_MAY_CHMOD); in apparmor_path_chmod()
355 static int apparmor_path_chown(struct path *path, kuid_t uid, kgid_t gid) in apparmor_path_chown() argument
357 struct path_cond cond = { path->dentry->d_inode->i_uid, in apparmor_path_chown()
358 path->dentry->d_inode->i_mode in apparmor_path_chown()
361 if (!mediated_filesystem(path->dentry->d_inode)) in apparmor_path_chown()
364 return common_perm(OP_CHOWN, path, AA_MAY_CHOWN, &cond); in apparmor_path_chown()