[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/56733: mtree bug processing filenames containing asterisks
>Synopsis: mtree bug processing filenames containing asterisks
>Arrival-Date: Mon Feb 28 13:35:00 +0000 2022
>Originator: John Goerzen
>Release: Looks to date back 12 years or so
Let's say I have a directory containing these files, one of which contains an asterisk:
Further assume they are different sizes and have different content.
If, in the output from mtree -c, file* is emitted before the others, the later mtree verify will apparently match all four files using the rule file* and emit errors on the other three. I observed this in the wild.
A workaround is to manually edit the emitted mtree data and move file* to be after the other non-wildcard files; then it will properly verify.
Additionally, the support for wildcards in the mtree format is not documented that I can see, and probably should be. Or perhaps it should be removed, since AFAICT, no tools are generating mtree files intentionally using this feature.
This may be related to the call to fnmatch in http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/pkgtools/mtree/files/verify.c?rev=1.6&content-type=text/x-cvsweb-markup .
1) wildcard support in the mtree format should be removed,
or 2) the generation code needs to escape fnmatch glob characters in its output, and this should all be documented.
Main Index |
Thread Index |