]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/idmapping.c: get_map_ranges(): Remove dead code
authorAlejandro Colomar <alx@kernel.org>
Thu, 11 Jan 2024 11:19:24 +0000 (12:19 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 12 Jul 2024 03:42:58 +0000 (22:42 -0500)
This test is impossible.  The limits specified in a2ul() already cover
this.

Link: <https://github.com/shadow-maint/shadow/commit/ff2baed5dbf81e8967b805889f565fedb48600df#r136635300>
Cc: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/idmapping.c

index 3f55d8c8a189775642170f114d2ac7c82eabbc66..b910764746c438c40b026b0cb8f13204af568389 100644 (file)
@@ -80,11 +80,6 @@ struct map_range *get_map_ranges(int ranges, int argc, char **argv)
                        free(mappings);
                        return NULL;
                }
-               if (m->lower + m->count < m->lower || m->upper + m->count < m->upper) {
-                       /* this one really shouldn't be possible given previous checks */
-                       fprintf(log_get_logfd(), _( "%s: subuid overflow detected.\n"), log_get_progname());
-                       exit(EXIT_FAILURE);
-               }
        }
        return mappings;
 }