X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a6c6f8e650f9790c7827ad1ff321fe21daf522cf..555a081fe245eec5d1dcabd90eb5bce9e2840237:/loadparm.c diff --git a/loadparm.c b/loadparm.c index 982fda76..010e089a 100644 --- a/loadparm.c +++ b/loadparm.c @@ -157,6 +157,7 @@ typedef struct BOOL ignore_errors; BOOL ignore_nonreadable; BOOL list; + BOOL munge_symlinks; BOOL read_only; BOOL strict_modes; BOOL transfer_logging; @@ -205,6 +206,7 @@ static service sDefault = /* ignore_errors; */ False, /* ignore_nonreadable; */ False, /* list; */ True, + /* munge_symlinks; */ (BOOL)-1, /* read_only; */ True, /* strict_modes; */ True, /* transfer_logging; */ False, @@ -319,6 +321,7 @@ static struct parm_struct parm_table[] = {"log format", P_STRING, P_LOCAL, &sDefault.log_format, NULL,0}, {"max connections", P_INTEGER,P_LOCAL, &sDefault.max_connections, NULL,0}, {"max verbosity", P_INTEGER,P_LOCAL, &sDefault.max_verbosity, NULL,0}, + {"munge symlinks", P_BOOL, P_LOCAL, &sDefault.munge_symlinks, NULL,0}, {"name", P_STRING, P_LOCAL, &sDefault.name, NULL,0}, {"outgoing chmod", P_STRING, P_LOCAL, &sDefault.outgoing_chmod, NULL,0}, {"path", P_PATH, P_LOCAL, &sDefault.path, NULL,0}, @@ -422,6 +425,7 @@ FN_LOCAL_BOOL(lp_fake_super, fake_super) FN_LOCAL_BOOL(lp_ignore_errors, ignore_errors) FN_LOCAL_BOOL(lp_ignore_nonreadable, ignore_nonreadable) FN_LOCAL_BOOL(lp_list, list) +FN_LOCAL_BOOL(lp_munge_symlinks, munge_symlinks) FN_LOCAL_BOOL(lp_read_only, read_only) FN_LOCAL_BOOL(lp_strict_modes, strict_modes) FN_LOCAL_BOOL(lp_transfer_logging, transfer_logging) @@ -780,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;