Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address does not work in [global] module #409

Closed
malyn opened this issue Nov 21, 2022 · 2 comments
Closed

address does not work in [global] module #409

malyn opened this issue Nov 21, 2022 · 2 comments

Comments

@malyn
Copy link

malyn commented Nov 21, 2022

I am using NixOS to run the rsync daemon, which requires that all parameters be specified in a module context (including global parameters). This means that I have to use a config like the following in order to bind to a specific address:

[global]
address = 127.0.0.1

This does not work, as rsync seems to ignore the address parameter when specified in the [global] section. The following does work, just to illustrate the issue:

address = 127.0.0.1

My assumption, based on following paragraph in the GLOBAL PARAMETERS section in the man page, was that the two config files above were equivalent:

The first parameters in the file (before a [module] header) are the global parameters.
Rsync also allows for the use of a "[global]" module name to indicate the start of one
or more global-parameter sections (the name must be lower case).

I could also interpret this to mean that the [global] module is only used to override the defaults for other modules and that non-module parameters (such as address) need to be specified before any module sections (including [global]).

I can submit a patch to the NixOS module if everything here is working as designed (non-module globals are not allowed in the [global] section), but I thought I should check first to see what as intended on the rsync side of things.

Initially discovered in rsync 3.2.5, verified still present in rsync 3.2.7.

@WayneD
Copy link
Member

WayneD commented Nov 23, 2022

When the daemon is starting up, it stops scanning the config file at the first module line, not even checking if it is a [global] section. Thus, the only way to affect something like address is to place it at the top of the file without using [global]. The docs should get updated to mention that [global] cannot be used to set daemon parameters.

@WayneD WayneD closed this as completed Nov 23, 2022
@malyn
Copy link
Author

malyn commented Nov 23, 2022

Thanks for the clarification! (and for updating the docs so quickly) I will submit a patch to NixOS to allow non-module globals to appear before the [global] section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants