gokrb5 icon indicating copy to clipboard operation
gokrb5 copied to clipboard

Fails to parse include and includedir files

Open johnnybubonic opened this issue 2 years ago • 1 comments

Currently, the include and includedir directives of krb5.conf are not parsed. They are not even considered. They are indeed a canonical directive of krb5.conf:

The krb5.conf file can include other files using either of the following directives at the beginning of a line:

include FILENAME includedir DIRNAME

FILENAME or DIRNAME should be an absolute path. The named file or directory must exist and be readable. Including a directory includes all files within the directory whose names consist solely of alphanumeric characters, dashes, or underscores. Included profile files are syntactically independent of their parents, so each included file must begin with a section header.

Because of this, this library entirely fails to work properly on e.g. RHEL/EL Linux distributions which have been joined to a domain via sssd, as SSSD makes use of nested includedir directives to manage Kerberos.

I suspect you could simply do a "pre-pass" parse, searching only for lines that have an include or includedir directive, and replacing those lines in-place with the referenced file(s') contents.

johnnybubonic avatar Jan 04 '23 21:01 johnnybubonic

Just wanted to +1 on this issue, would be nice to have a fix to use this library on EL

bendylan avatar Aug 09 '23 12:08 bendylan