Lines Matching refs:parent_node
313 const struct fuse_in_header *hdr, const struct node* parent_node, in check_caller_access_to_name() argument
316 if (parent_node && parent_node->perm == PERM_ROOT) { in check_caller_access_to_name()
590 struct node* parent_node; in handle_lookup() local
596 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_lookup()
599 << " (" << (parent_node ? parent_node->name : "?") << ")"; in handle_lookup()
602 if (!parent_node || !(actual_name = find_file_within(parent_path, name, in handle_lookup()
606 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, R_OK)) { in handle_lookup()
610 return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path); in handle_lookup()
724 struct node* parent_node; in handle_mknod() local
730 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_mknod()
734 << " (" << (parent_node ? parent_node->name : "?") << ")"; in handle_mknod()
737 if (!parent_node || !(actual_name = find_file_within(parent_path, name, in handle_mknod()
741 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK)) { in handle_mknod()
748 return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path); in handle_mknod()
754 struct node* parent_node; in handle_mkdir() local
760 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_mkdir()
764 << " (" << (parent_node ? parent_node->name : "?") << ")"; in handle_mkdir()
767 if (!parent_node || !(actual_name = find_file_within(parent_path, name, in handle_mkdir()
771 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK)) { in handle_mkdir()
780 if (parent_node->perm == PERM_ANDROID && !strcasecmp(name, "data")) { in handle_mkdir()
788 if (parent_node->perm == PERM_ANDROID && !strcasecmp(name, "obb")) { in handle_mkdir()
797 return fuse_reply_entry(fuse, hdr->unique, parent_node, name, actual_name, child_path); in handle_mkdir()
803 struct node* parent_node; in handle_unlink() local
809 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_unlink()
812 << " (" << (parent_node ? parent_node->name : "?") << ")"; in handle_unlink()
815 if (!parent_node || !find_file_within(parent_path, name, in handle_unlink()
819 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK)) { in handle_unlink()
826 child_node = lookup_child_by_name_locked(parent_node, name); in handle_unlink()
831 if (parent_node && child_node) { in handle_unlink()
834 << " parent=" << std::hex << parent_node->nid in handle_unlink()
838 fuse_notify_delete(fuse->global->fuse_default, parent_node->nid, child_node->nid, name); in handle_unlink()
841 fuse_notify_delete(fuse->global->fuse_read, parent_node->nid, child_node->nid, name); in handle_unlink()
844 fuse_notify_delete(fuse->global->fuse_write, parent_node->nid, child_node->nid, name); in handle_unlink()
854 struct node* parent_node; in handle_rmdir() local
859 parent_node = lookup_node_and_path_by_id_locked(fuse, hdr->nodeid, in handle_rmdir()
862 << " (" << (parent_node ? parent_node->name : "?") << ")"; in handle_rmdir()
865 if (!parent_node || !find_file_within(parent_path, name, in handle_rmdir()
869 if (!check_caller_access_to_name(fuse, hdr, parent_node, name, W_OK)) { in handle_rmdir()
876 child_node = lookup_child_by_name_locked(parent_node, name); in handle_rmdir()
881 if (parent_node && child_node) { in handle_rmdir()
884 << " parent=" << std::hex << parent_node->nid in handle_rmdir()
888 fuse_notify_delete(fuse->global->fuse_default, parent_node->nid, child_node->nid, name); in handle_rmdir()
891 fuse_notify_delete(fuse->global->fuse_read, parent_node->nid, child_node->nid, name); in handle_rmdir()
894 fuse_notify_delete(fuse->global->fuse_write, parent_node->nid, child_node->nid, name); in handle_rmdir()