summaryrefslogtreecommitdiff
path: root/params.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2011-03-11 16:09:49 -0800
committerWayne Davison <wayned@samba.org>2011-03-11 16:13:33 -0800
commitf7c3a2505297c9fe16dc18ab6066d71028b9ccd4 (patch)
tree71d9d3347fc3c2dc892ec29f47fd44284d6b5001 /params.c
parent6da6b02bb7ed1d8e7785118a8b203e50b983d1a8 (diff)
downloadrsync-f7c3a2505297c9fe16dc18ab6066d71028b9ccd4.tar.gz
Change rsyncd.conf &merge directive to match *.inc.
This allows the same rsyncd.d directory to be used for a set of merge files (*.inc) and a set of include files (*.conf).
Diffstat (limited to 'params.c')
-rw-r--r--params.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/params.c b/params.c
index a14242e8..0fbd9863 100644
--- a/params.c
+++ b/params.c
@@ -428,6 +428,7 @@ static int name_cmp(const void *n1, const void *n2)
static int include_config(char *include, int manage_globals)
{
STRUCT_STAT sb;
+ char *match = manage_globals ? "*.conf" : "*.inc";
int ret;
if (do_stat(include, &sb) < 0) {
@@ -457,7 +458,7 @@ static int include_config(char *include, int manage_globals)
while ((di = readdir(d)) != NULL) {
char *dname = d_name(di);
- if (!wildmatch("*.conf", dname))
+ if (!wildmatch(match, dname))
continue;
bpp = EXPAND_ITEM_LIST(&conf_list, char *, 32);
pathjoin(buf, sizeof buf, include, dname);