summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-01-09 08:59:02 -0800
committerWayne Davison <wayned@samba.org>2008-01-09 11:41:23 -0800
commitec8637f3679b891041c798400774141024e24a4e (patch)
tree9de4ac947d1a9d4b1c0326825303afc754f04195
parent62a6b8df72d18f0b13462ee7ac33f9a8a46ef0b5 (diff)
downloadrsync-ec8637f3679b891041c798400774141024e24a4e.tar.gz
Don't allow a slash to be specified in a module name.
Document the module-name limitations in rsyncd.conf.yo.
-rw-r--r--loadparm.c5
-rw-r--r--rsyncd.conf.yo4
2 files changed, 9 insertions, 0 deletions
diff --git a/loadparm.c b/loadparm.c
index 0915000d..010e089a 100644
--- a/loadparm.c
+++ b/loadparm.c
@@ -784,6 +784,11 @@ static BOOL do_section(char *sectionname)
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 */
bRetval = True;
diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo
index ffb9473b..b914570d 100644
--- a/rsyncd.conf.yo
+++ b/rsyncd.conf.yo
@@ -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
exported by specifying a module name in square brackets [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()