Commit ec8637f3 authored by Wayne Davison's avatar Wayne Davison

Don't allow a slash to be specified in a module name.

Document the module-name limitations in rsyncd.conf.yo.
parent 62a6b8df
...@@ -784,6 +784,11 @@ static BOOL do_section(char *sectionname) ...@@ -784,6 +784,11 @@ static BOOL do_section(char *sectionname)
return(True); return(True);
} }
if (strchr(sectionname, '/') != NULL) {
rprintf(FLOG, "Warning: invalid section name in configuration file: %s\n", sectionname);
return False;
}
/* if we have a current service, tidy it up before moving on */ /* if we have a current service, tidy it up before moving on */
bRetval = True; bRetval = True;
......
...@@ -113,6 +113,10 @@ After the global options you should define a number of modules, each ...@@ -113,6 +113,10 @@ After the global options you should define a number of modules, each
module exports a directory tree as a symbolic name. Modules are module exports a directory tree as a symbolic name. Modules are
exported by specifying a module name in square brackets [module] exported by specifying a module name in square brackets [module]
followed by the options for that module. followed by the options for that module.
The module name cannot contain a slash or a closing square bracket. If the
name contains whitespace, each internal sequence of whitespace will be
changed into a single space, while leading or trailing whitespace will be
discarded.
startdit() startdit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment