escape interface name in path generated by xsl transform
The XML representation understood/used by augeas has a "path" that is
used to locate the interface config in the augeas tree. This path has
been constructed by a XSL transforms in (redhat|suse)-get.xsl, by
doing a simple string concatenation. Although the actual name in the
config *shouldn't* be escaped, its usage in the augeas path should be.
This patch defines an xslt extension to perform the escaping, then
calls it from the xsl transforms for redhat and suse (the debian
config is all in a single file with a fixed name that will never need
escaping).
Due to the RNG restricting interface names to "[a-zA-Z0-9_\.\-:/\|]+"
(see device-name in interface.rng), none of which require escaping for
augeas, so it was necessary to temporarily modify device-name to allow
some extra characters in order to properly test the xslt
extension. With this extension in place, and the RNG grammar properly
loosened, it was possible to define, list, dumpxml, ifup, ifdown, and
undefine a bridge interface named '.|abab'. The only strange
observances were both uncontrollable by netcf:
1) "brctl show" did not show the new bridge named '.|abab', although
it was visible in the output of "ifconfig" and shown as a bridge
device by "ip -d link show"
2) after "ncftool ifdown '.|abab'" the bridge was marked as down, but
/sbin/ifdown failed to delete it. "ip link del '.|abab'" was
successful, though.
Since the RNG has only been loosened locally for the purposes of this
test, I don't consider this anything to worry about.