133 Commits

Author SHA1 Message Date
Max Kellermann
b6457bbc83 make lots of global variables const
This way, they can live in `.rodata` and the compiler is allowed to do
certain optimizations.
2025-08-23 17:31:40 +10:00
Wayne Davison
8f1511184a Make gcc die on init overflow of an array.
- Use -pedantic-errors with gcc to make an array-init fatal.
- Fix all the extra warnings that gcc outputs due to this option.
- Also add -Wno-pedantic to gcc if we're using the internal popt
  code (since it has lots of pedantic issues).
2020-09-29 13:18:28 -07:00
Wayne Davison
d495e343c0 A few word tweaks. 2020-07-12 12:38:12 -07:00
Wayne Davison
565cde84a7 Don't turn off the user's open-noatime unless the module is forcing the value. 2020-07-04 10:28:38 -07:00
Wayne Davison
7d30490ef4 Simplify the daemon parameter definitions
The code now derives all the struct defines, default value assignments,
parser-param defines, and lp_foo() accessor functions from a single list
of daemon parameters.
2020-06-30 19:30:28 -07:00
Wayne Davison
317beebef8 Avoid crash of transfer logging w/default log format. 2020-06-30 12:16:52 -07:00
Wayne Davison
11eb67eec9 Some memory allocation improvements
- All the memory-allocation macros now auto-check for failure and exit
   with a failure message that incudes the caller's file and lineno
   info.  This includes strdup().

 - Added the `--max-alloc=SIZE` option to be able to override the memory
   allocator's sanity-check limit.  It defaults to 1G (as before).
   Fixes bugzilla bug 12769.
2020-06-25 20:54:21 -07:00
Wayne Davison
b5e539fc5a Use documentation to extract 2 more .h lists
- Change default_cvsignore char[] into a define.
- Make the DEFAULT_DONT_COMPRESS and DEFAULT_CVSIGNORE defines get set
  based on their info in rsync.1.md.
- Add a few more don't-compress suffixes from Simon Matter.
2020-06-18 11:20:57 -07:00
Wayne Davison
249e28c75a Rename "haproxy header" to "proxy protocol". 2020-06-15 11:33:23 -07:00
Wayne Davison
cff0764b7f Add haproxy header parameter to rsync daemon 2020-06-11 14:22:25 -07:00
Wayne Davison
a3377921eb Add early exec daemon parameter.
Inspired by Ciprian Dorin Craciun's `bootstrap exec` patch.
2020-06-10 21:38:37 -07:00
Wayne Davison
ea3337a210 Add extensions to the default no-compress list.
Fixes bug #13749.
2020-04-26 17:07:58 -07:00
Wayne Davison
d29702134a Spelling fixes from a Fossies run done by Jens. 2020-04-15 17:42:23 -07:00
Wayne Davison
c5fabfb068 Set Copyright years and make them easier to update
I replaced git-set-file-times with an improved version that I wrote
recently (in python3). A new script uses it to figure out the
last-modified year for each *.[ch] file and updates its copyright.
It also puts the latest year into the latest-year.h file for the
output of --version.
2020-04-09 15:11:37 -07:00
Wayne Davison
2598ca668b Fix the default skip-compress list.
The default value of the skip-compress list actually comes from the
daemon's default lp_dont_compress() value, but a while back the vars
stopped getting default values in a non-daemon run. I added a call to
reset_daemon_vars() so that the "Vars" values get set from "Defaults".
2020-04-07 18:15:09 -07:00
Wayne Davison
3e2e4b5a33 Tweak the copyright year. 2019-03-16 09:15:49 -07:00
Wayne Davison
f627e27749 Save each expanded daemon-config string on first use to
avoid a new alloc on every use (one that was not freed).
2019-01-09 13:35:21 -08:00
Wayne Davison
0b6cae6792 No need to strdup each new section since we stopped using free(). 2019-01-08 20:30:58 -08:00
Wayne Davison
473108ae6e Tweak copyright date. 2018-01-14 19:55:07 -08:00
Wayne Davison
881addc9e1 Add "daemon chroot|uid|gid" parameters.
This allows the daemon to run chrooted as any uid+gid you like
(prior to the transfer possibly changing the chroot and/or the
uid+gid further). Based on the patch in #12817.
2017-09-04 14:20:16 -07:00
Wayne Davison
ce854cf021 Add "syslog tag" to rsync daemon config. 2017-04-29 13:49:14 -07:00
Wayne Davison
453914e35b Update the copyright year. 2015-08-08 12:47:03 -07:00
Wayne Davison
dfa5b49110 Bump the year to 2014. 2014-01-26 09:29:15 -08:00
Wayne Davison
7e1a9c4d79 Update copyright year. 2013-01-19 11:05:53 -08:00
Wayne Davison
050e5334d8 Added "listen backlog" daemon config paramater. 2011-01-03 19:42:27 -08:00
Wayne Davison
bf4170ade8 Daemon supports forward-DNS lookups for simple hostnames
in hosts deny/allow config settings.
2011-01-03 19:04:06 -08:00
Wayne Davison
aff4850053 Add some new dont-compress suffixes.
As suggested in bug 6839.
2010-08-21 14:41:53 -07:00
Wayne Davison
0a9fbe17de Allow %VAR% environment references in daemon-config parameter values. 2009-10-17 16:30:23 -07:00
Wayne Davison
4b660bae92 Add a few new "dont compress" suffixes and improve the docs. 2009-09-05 10:29:29 -07:00
Wayne Davison
7f367bb1b4 Added a way for supplementary groups to be specified in the rsyncd.conf
file.  Also made explicitly-set uid/gid values no longer ignored by a
daemon that was not run by a super-user.
2009-02-19 23:08:48 -08:00
Wayne Davison
43eb865f9a Made copy_section() and string_set() simpler, getting rid of a
"FIXME" comment that we don't need to fix.
2009-02-06 07:27:18 -08:00
Wayne Davison
789213909d Combine Globals and Locals into a Vars struct that parallels Defaults,
shortening some code.  Improve comments and make other minor cleanups.
Based on a patch that Matt McCutchen posted to the mailing list.
2009-02-05 07:35:33 -08:00
Wayne Davison
243e9a366d Added a "Defaults" structure with both globals and locals in it.
Initialize both the Globals and Locals back to their default values
when reading the config.  This fixes a bug where locals set in the
global section were not getting reset to their default value if the
config item was removed from the file.
2009-01-18 22:42:41 -08:00
Wayne Davison
b53c202e45 A couple minor function-call tweaks. 2009-01-18 22:40:17 -08:00
Wayne Davison
aef68d7892 Renamed some typedefs:
- global -> global_vars
- section -> local_vars
- global_and_section -> all_vars
2009-01-18 22:39:57 -08:00
Wayne Davison
077e543b7d Renamed sDefault to Locals. 2009-01-18 22:39:20 -08:00
Matt McCutchen
11ef77b76a Added the "reverse lookup" daemon-config parameter. 2009-01-15 00:22:36 -08:00
Wayne Davison
b3bf9b9df9 Update the copyright year. 2009-01-03 10:57:14 -08:00
Wayne Davison
5dd14f0c33 Split up the ifuncs.h file into 3 .h files. 2008-09-01 19:11:36 -07:00
Wayne Davison
582831a447 - Don't require a daemon config &directive to use an equal sign.
- Improved some daemon-config error messages.
2008-07-27 16:25:11 -07:00
Wayne Davison
2206abf884 Added a command-line override for daemon config parameters:
--dparam=PARAMETER=VALUE (-M PARAMETER=VALUE).
2008-07-27 12:13:35 -07:00
Wayne Davison
fcd613d6c7 - Got rid of unused pstring/P_GSTRING/P_SEP/P_SEPARATOR code.
- Made pointer-adding code a little better.
2008-07-27 12:06:26 -07:00
Wayne Davison
8a3ddcfc81 Added &include and &merge config-file directives that allow the
daemon's config file incorporate the contents of other files.
2008-07-26 20:03:45 -07:00
Wayne Davison
c9604e2115 Changed the module array to use an item_list structure. 2008-07-26 19:57:02 -07:00
Wayne Davison
b583594ac7 Change the references to "service" to be either "section" or "module". 2008-07-26 19:11:32 -07:00
Wayne Davison
36828daef1 Reorder the static functions to avoid the need for forward declarations. 2008-07-26 17:47:02 -07:00
Wayne Davison
8880d8ec5e Since the loadparm.c file is changing, I'm reformatting it to use the
rsync style.
2008-07-26 17:42:09 -07:00
Wayne Davison
beef86d0dd A few minor changes, including better push_dir()/pop_dir() verbosity. 2008-02-15 22:19:43 -08:00
Wayne Davison
0b52f94da7 Some daemon security improvements, including the new parameters
"charset" and "numeric ids".
2008-02-15 17:39:21 -08:00
Wayne Davison
ec8637f367 Don't allow a slash to be specified in a module name.
Document the module-name limitations in rsyncd.conf.yo.
2008-01-09 11:41:23 -08:00