opnsense-src/usr.sbin/makefs
Ed Maste 1f31d43742 makefs: Fix cd9660 duplicate directory names
Previously we could create cd9660 images with duplicate short (level 2)
names.

cd9660_level2_convert_filename used a 30-character limit (for files and
directories), not including the '.' separator.  cd9660_rename_filename
used a 31-character limit, including the '.'.  Directory names 31
characters or longer (without '.') were shortened to 30 characters, and
if a collision occurred cd9660_rename_filename uniquified them starting
with the 31st character.  Unfortunately the directory record's name_len
was already set, so the unique part of the name was stripped off.

Directories are up to 31 d-characters (i.e., A-Z 0-9 and _); there is no
provision for a '.' in a directory name.  Increase the name length limit
to 31 for directories, and exclude '.'s.

This name mapping and deduplication code is still fragile and convoluted
and would beenfit from a more holistic effort.

PR:		283238, 283112
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48251
2024-12-30 14:48:44 -05:00
..
cd9660 usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
ffs usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
msdos makefs: Remove a stray semicolon 2024-10-24 23:04:48 +08:00
sys Fix makefs bootstrap after d485c77f20 2021-02-22 17:55:45 +00:00
tests makefs: Fix cd9660 duplicate directory names 2024-12-30 14:48:44 -05:00
zfs makefs: Record a larger TXG number in the uberblock 2024-10-14 13:14:37 +00:00
cd9660.c makefs: Fix cd9660 duplicate directory names 2024-12-30 14:48:44 -05:00
cd9660.h makefs: Fix cd9660 filename buffer maximum length 2024-12-26 11:44:36 -05:00
ffs.c makefs: warn that ffs sectorsize other than 512 may not work 2024-01-26 17:27:57 -05:00
ffs.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.host Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend.options Build host tools on non-FreeBSD host with DIRDEPS_BUILD 2023-04-22 13:13:22 -07:00
makefs.8 makefs.8: Clarify that makefs-generated zpools always have the same GUID 2024-11-19 21:18:38 +00:00
makefs.c makefs: Make it possible to silence warnings about duplicate paths 2024-01-19 19:50:56 -05:00
makefs.h Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
msdos.c usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
msdos.h Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:29 -06:00
mtree.c makefs: Make it possible to silence warnings about duplicate paths 2024-01-19 19:50:56 -05:00
walk.c usr.sbin: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:01 -07:00
zfs.c makefs: Record a larger TXG number in the uberblock 2024-10-14 13:14:37 +00:00