Lines Matching refs:dentry

186 				  struct dentry *dentry, u32 mask,  in common_perm_dir_dentry()  argument
189 struct path path = { dir->mnt, dentry }; in common_perm_dir_dentry()
204 struct dentry *dentry, u32 mask) in common_perm_mnt_dentry() argument
206 struct path path = { mnt, dentry }; in common_perm_mnt_dentry()
207 struct path_cond cond = { d_backing_inode(dentry)->i_uid, in common_perm_mnt_dentry()
208 d_backing_inode(dentry)->i_mode in common_perm_mnt_dentry()
224 struct dentry *dentry, u32 mask) in common_perm_rm() argument
226 struct inode *inode = d_backing_inode(dentry); in common_perm_rm()
229 if (!inode || !dir->mnt || !mediated_filesystem(dentry)) in common_perm_rm()
235 return common_perm_dir_dentry(op, dir, dentry, mask, &cond); in common_perm_rm()
248 static int common_perm_create(int op, struct path *dir, struct dentry *dentry, in common_perm_create() argument
253 if (!dir->mnt || !mediated_filesystem(dir->dentry)) in common_perm_create()
256 return common_perm_dir_dentry(op, dir, dentry, mask, &cond); in common_perm_create()
259 static int apparmor_path_unlink(struct path *dir, struct dentry *dentry) in apparmor_path_unlink() argument
261 return common_perm_rm(OP_UNLINK, dir, dentry, AA_MAY_DELETE); in apparmor_path_unlink()
264 static int apparmor_path_mkdir(struct path *dir, struct dentry *dentry, in apparmor_path_mkdir() argument
267 return common_perm_create(OP_MKDIR, dir, dentry, AA_MAY_CREATE, in apparmor_path_mkdir()
271 static int apparmor_path_rmdir(struct path *dir, struct dentry *dentry) in apparmor_path_rmdir() argument
273 return common_perm_rm(OP_RMDIR, dir, dentry, AA_MAY_DELETE); in apparmor_path_rmdir()
276 static int apparmor_path_mknod(struct path *dir, struct dentry *dentry, in apparmor_path_mknod() argument
279 return common_perm_create(OP_MKNOD, dir, dentry, AA_MAY_CREATE, mode); in apparmor_path_mknod()
284 struct path_cond cond = { d_backing_inode(path->dentry)->i_uid, in apparmor_path_truncate()
285 d_backing_inode(path->dentry)->i_mode in apparmor_path_truncate()
288 if (!path->mnt || !mediated_filesystem(path->dentry)) in apparmor_path_truncate()
295 static int apparmor_path_symlink(struct path *dir, struct dentry *dentry, in apparmor_path_symlink() argument
298 return common_perm_create(OP_SYMLINK, dir, dentry, AA_MAY_CREATE, in apparmor_path_symlink()
302 static int apparmor_path_link(struct dentry *old_dentry, struct path *new_dir, in apparmor_path_link()
303 struct dentry *new_dentry) 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()
349 if (!mediated_filesystem(path->dentry)) in apparmor_path_chmod()
352 return common_perm_mnt_dentry(OP_CHMOD, path->mnt, path->dentry, AA_MAY_CHMOD); in apparmor_path_chmod()
357 struct path_cond cond = { d_backing_inode(path->dentry)->i_uid, in apparmor_path_chown()
358 d_backing_inode(path->dentry)->i_mode in apparmor_path_chown()
361 if (!mediated_filesystem(path->dentry)) in apparmor_path_chown()
369 if (!mediated_filesystem(path->dentry)) in apparmor_inode_getattr()
372 return common_perm_mnt_dentry(OP_GETATTR, path->mnt, path->dentry, in apparmor_inode_getattr()
382 if (!mediated_filesystem(file->f_path.dentry)) in apparmor_file_open()
435 !mediated_filesystem(file->f_path.dentry)) in common_file_perm()