Lines Matching refs:new_map

734 static bool mappings_overlap(struct uid_gid_map *new_map,  in mappings_overlap()  argument
745 for (idx = 0; idx < new_map->nr_extents; idx++) { in mappings_overlap()
750 if (new_map->nr_extents <= UID_GID_MAP_MAX_BASE_EXTENTS) in mappings_overlap()
751 prev = &new_map->extent[idx]; in mappings_overlap()
753 prev = &new_map->forward[idx]; in mappings_overlap()
882 struct uid_gid_map *new_map) in verify_root_map() argument
888 for (idx = 0; idx < new_map->nr_extents; idx++) { in verify_root_map()
889 if (new_map->nr_extents <= UID_GID_MAP_MAX_BASE_EXTENTS) in verify_root_map()
890 extent0 = &new_map->extent[idx]; in verify_root_map()
892 extent0 = &new_map->forward[idx]; in verify_root_map()
930 struct uid_gid_map new_map; in map_write() local
966 memset(&new_map, 0, sizeof(struct uid_gid_map)); in map_write()
1028 if (mappings_overlap(&new_map, &extent)) in map_write()
1031 if ((new_map.nr_extents + 1) == UID_GID_MAP_MAX_EXTENTS && in map_write()
1035 ret = insert_extent(&new_map, &extent); in map_write()
1041 if (new_map.nr_extents == 0) in map_write()
1046 if (!new_idmap_permitted(file, map_ns, cap_setid, &new_map)) in map_write()
1053 for (idx = 0; idx < new_map.nr_extents; idx++) { in map_write()
1057 if (new_map.nr_extents <= UID_GID_MAP_MAX_BASE_EXTENTS) in map_write()
1058 e = &new_map.extent[idx]; in map_write()
1060 e = &new_map.forward[idx]; in map_write()
1079 ret = sort_idmaps(&new_map); in map_write()
1084 if (new_map.nr_extents <= UID_GID_MAP_MAX_BASE_EXTENTS) { in map_write()
1085 memcpy(map->extent, new_map.extent, in map_write()
1086 new_map.nr_extents * sizeof(new_map.extent[0])); in map_write()
1088 map->forward = new_map.forward; in map_write()
1089 map->reverse = new_map.reverse; in map_write()
1092 map->nr_extents = new_map.nr_extents; in map_write()
1097 if (ret < 0 && new_map.nr_extents > UID_GID_MAP_MAX_BASE_EXTENTS) { in map_write()
1098 kfree(new_map.forward); in map_write()
1099 kfree(new_map.reverse); in map_write()
1164 struct uid_gid_map *new_map) in new_idmap_permitted() argument
1168 if (cap_setid == CAP_SETUID && !verify_root_map(file, ns, new_map)) in new_idmap_permitted()
1174 if ((new_map->nr_extents == 1) && (new_map->extent[0].count == 1) && in new_idmap_permitted()
1176 u32 id = new_map->extent[0].lower_first; in new_idmap_permitted()