Struct names and members for secrets.conf
Julien ÉLIE
julien at trigofacile.com
Mon Dec 27 16:41:26 UTC 2021
Hi Russ,
>> we may probably want a general program for that, and not a dedicated
>> one for each configuration file...
>> Why not add a -f flag (for "file") to innconfval? Default value is
>> "inn.conf", and it can be set to other file names (like "secrets.conf").
>
> That's a good idea!
It may be useful. I'll see what I can do.
Speaking of file names, I'm wondering whether "inn.secrets" wouldn't be
better. I remember we once had to change radius.conf to inn-radius.conf
(as the radius program already exists); secrets.conf is a general name
that may be used by other programs, so maybe inn.secrets(5) will be
better for the man page and the file name.
>> Not all secrets are strings. Here, for canlockadmin, it is a vector.
>> So maybe we need get_secret_list(secrets, "cancels", "canlockadmin") and
>> another get_secret_string() function for future string secrets?
>
> Oh, good point, I hadn't thought about that. I'm not entirely sure the
> additional complexity is worth it (your approach looked fine). We can
> always wait and see if that would be a simplification.
We could have both approaches:
- secrets->canlockadmin (or innsecrets->canlockadmin which would be a
good name too if we have inn.secrets) and other (inn)secrets->xxx
variables for all secrets that are defined only once in the secrets.conf
file;
- get_secret_string() or other similar functions for any secrets that
may appear several times at different scopes of the file. And we'll see
how to do that when it happens.
--
Julien ÉLIE
« Medicorum nutrix est intemperantia. »
More information about the inn-workers
mailing list