Proposed lexer for parsing krb5.conf files

Wyllys Ingersoll wyllys.ingersoll at
Tue Nov 22 11:02:52 EST 2005

Sam Hartman wrote:
> >>>>> "Paul" == Paul Moore <paul.moore at> writes:
>  Paul> Why not go crazy and drag krb5 kicking and screaming into Paul>
>  the 21st century and make the config file XML You get the Paul>
>  parser, editors, validation, low level API, pretty display, Paul>
>  base syntax rules, base extension capability all for free
>  Because it would complicate the code significantly and it would lose
>  us compatibility with existing files.
>  I think the build headaches for dealing with xml toolchains would be
>  worse than implementing Joe's lexer.

xml trees are dealt with quite nicely already in libxml2, its not
terribly difficult.

The profile parsing code could be written to remain backwards compatible
pretty easily - check the syntax of the first few lines and branch the
code accordingly.

Switching to XML moves the pain of processing and parsing the code out
of the krb5 codebase, thus removing that much more code from having
to be maintained.   It has other benefits as well, having the file
in a "standard" format makes it easier to develop new tools for
manipulating that file - perhaps a web-based tool for managing
the config settings, for example.

I think it is worth some more thought and investigation, there are
definite benefits in developing an XML schema for the config data and
I don't think it would be all that difficult as compared to rewriting
the current profile parsing code.


More information about the krbdev mailing list