Lines Matching refs:dentry
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()
238 struct dentry *dentry, u32 mask, in common_perm_dir_dentry() argument
241 struct path path = { .mnt = dir->mnt, .dentry = dentry }; in common_perm_dir_dentry()
256 struct dentry *dentry, u32 mask) in common_perm_rm() argument
258 struct inode *inode = d_backing_inode(dentry); in common_perm_rm()
261 if (!inode || !path_mediated_fs(dentry)) in common_perm_rm()
267 return common_perm_dir_dentry(op, dir, dentry, mask, &cond); in common_perm_rm()
281 struct dentry *dentry, u32 mask, umode_t mode) in common_perm_create() argument
285 if (!path_mediated_fs(dir->dentry)) in common_perm_create()
288 return common_perm_dir_dentry(op, dir, dentry, mask, &cond); in common_perm_create()
291 static int apparmor_path_unlink(const struct path *dir, struct dentry *dentry) in apparmor_path_unlink() argument
293 return common_perm_rm(OP_UNLINK, dir, dentry, AA_MAY_DELETE); in apparmor_path_unlink()
296 static int apparmor_path_mkdir(const struct path *dir, struct dentry *dentry, in apparmor_path_mkdir() argument
299 return common_perm_create(OP_MKDIR, dir, dentry, AA_MAY_CREATE, in apparmor_path_mkdir()
303 static int apparmor_path_rmdir(const struct path *dir, struct dentry *dentry) in apparmor_path_rmdir() argument
305 return common_perm_rm(OP_RMDIR, dir, dentry, AA_MAY_DELETE); in apparmor_path_rmdir()
308 static int apparmor_path_mknod(const struct path *dir, struct dentry *dentry, in apparmor_path_mknod() argument
311 return common_perm_create(OP_MKNOD, dir, dentry, AA_MAY_CREATE, mode); in apparmor_path_mknod()
319 static int apparmor_path_symlink(const struct path *dir, struct dentry *dentry, in apparmor_path_symlink() argument
322 return common_perm_create(OP_SYMLINK, dir, dentry, AA_MAY_CREATE, in apparmor_path_symlink()
326 static int apparmor_path_link(struct dentry *old_dentry, const struct path *new_dir, in apparmor_path_link()
327 struct dentry *new_dentry) 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()
355 .dentry = old_dentry }; in apparmor_path_rename()
357 .dentry = new_dentry }; in apparmor_path_rename()
398 if (!path_mediated_fs(file->f_path.dentry)) in apparmor_file_open()
451 if (file->f_path.dentry == aa_null.dentry) in common_file_perm()