[Csync2] Any reason why "-C" option restricts csync2 config files to be limited to alphanumeric characters?
Lars Ellenberg
lars.ellenberg at linbit.com
Mon Mar 19 17:17:42 CET 2012
On Mon, Mar 19, 2012 at 05:05:28PM +0530, Samba wrote:
> Hi,
>
> I would like to utilize modular configuration files which csync2 supports;
> but have a curiosity to know why those additional configuration file names
> are restricted to just alphanumeric characters ([a-z0-9]). This restriction
> also prevents one from grouping those modular config files into subfolders,
> like say, "essential", "optional", "large", etc which would have helped
> schedule different intervals for different sets of configuration files.
>
> If there is no technical reason to restrict csync2 config file name to just
> alphanumeric characters, then would it be a good idea to patch to allow the
> above mentioned usecases? i.e allow other characters like '_', '-', etc and
> also allow config files to be put under subdirectories of 'sysconf' dir or
> probably even allow specifying absolute path names...
Different "-C cfgname" will also use different databases,
with the cfgname encoded in the database name.
And those may have their own limitation.
Also the to-be-used config file name is communicated over the connection,
and you don't want some unpriviledged user to be able to trick your
csync2 daemon to use some arbitrary crafted config file.
There may be other reasons as well.
So if you plan to relax that constraint, keep in mind that you may cause
incompatibilities with current and future database backends, and
probably need a few additional sanity checks before you allow a csync2
daemon to even start looking at those config files.
Are you aware of csync2 *groups*?
You can have many different named groups in the same config file,
and if you give them on the command line (-G groupname1,group2,group3)
only those listed will be processed.
Lars
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
More information about the Csync2
mailing list