tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Inetd Enhancements - Include Directive



We are wrapping up our implementation of the new backwards compatible syntax
(thank you to Robert Elz for his helpful advice regarding the new header file
and C file). This means we are ready to begin implementing the include directive
to allow multiple files to be used for inetd’s  configuration. There was quite a
bit of discussion here a few months ago regarding how to best implement this
feature, after reading through those messages, our current plan is to implement
it with the following syntax:

!include <path>

<path> will be a glob, and all regular files with paths which match the glob
will be read as configuration files. We plan to use standard C glob() function
as well as lstat() (for checking for regular files), so that symbolic links will
work as well. Any non-regular files (or non-symbolic links to regular files)
will simply be skipped. Each configuration file will have it’s own “globals”
(listening address and ipsec policies), meaning if you set a global listening
address in one configuration file, and then include a glob, the listening
address will be reset to ‘*’ upon entry to each of the included files. We’d like
to allow multiple wild-cards in a glob, so that patterns like “/etc/*/*.conf”
would be valid.

We chose the ‘!’ to indicate an include directive because the ‘#’ character is
already being used for both comments and ipsec policies, and this would prevent
comments like “#include the config directory”. We aren’t set on this character,
some people seemed to be suggesting “.include” instead, but I personally like
the ‘!’. 

Our current plan is to simply implement a max recursion depth, so that inetd
will quit if the number of files included exceeds that depth. This will prevent
infinite cycles, while potentially allowing for a large number of configuration
files to be included, but we're not sure what a reasonable default number would
be.

Thank you for continuing to provide input regarding these changes, we welcome
any further advice or critiques you have of the new include system.

Best,
Inetd Team



Home | Main Index | Thread Index | Old Index