Viktor Dukhovni:
> On Fri, Jan 11, 2013 at 03:47:41PM -0500, Wietse Venema wrote:
> 
> > If the concerns with '=' and '.' in service names can be overcome,
> > then the mouss syntax would simplify the user interface to query
> > or update a master.cf attribute.
> 
> Neither is actually a problem provided we use "strrchr" to find
> the delimiter, since the attribute names never contain "=" or ".".

This would be incorrect when a "command" attribute value contains
'=', for example with "-o name=value" or with pipe(8) daemon command
lines.

I think that it's useful for scripting if postconf supports queries
for the command attribute (i.e. command name and arguments) just
like it supports queries for other master.cf attributes. And of
course, queries and assignments should use similar syntax.

If we allow '=' in service names then we would need to help the
parser a little, for example by allowing that a service name is
enclosed with [] (similar to what happened with IPv6 to avoid
mis-parsing the ':').

Otherwise, '=' in a service name can be mis-parsed even if the
parser knows all the names in master.cf. For example with two known
type.service entries "inet.foo" and "inet.foo.command=x", the string
"inet.foo.command=xx.chroot=y" can be parsed in two ways.

There is no such problem with "inet.[foo.command=x].chroot=y".

        Wietse

Reply via email to