Escape unsafe characters for kern.geom.confxml XML dump

Andriy Gapon avg at icyb.net.ua
Sat Mar 13 11:54:24 UTC 2010


on 13/03/2010 10:35 Jaakko Heinonen said the following:
> Hi,
> 
> I intend to commit following patch unless there are objections. I have
> seen the problem commonly reported by FreeBSD users.
> 
> ---
> 
> Escape characters unsafe for XML output in GEOM class, instance and provider
> names.
> 
> - Characters in range 0x01-0x1f except '\t', '\n', and '\r' are replaced
>   with '?'. Those characters are disallowed in XML.
> - '&', '<', '>', '\'', '"' and characters in range 0x7f-0xff are replaced
>   with XML numeric character reference.
> 
> If the kern.geom.confxml sysctl provides invalid XML, libgeom
> geom_xml2tree() fails and utilities using it do not work. Unsafe
> characters are common in msdosfs and cd9660 labels.
> 
> PR:		kern/104389
> Submitter by:	Doug Steinwand (original version)

Thank you for taking care of this one.


-- 
Andriy Gapon


More information about the freebsd-geom mailing list