Skip to content

Commit

Permalink
Don't set systemd ProtectHome=on by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
WayneD committed Jul 1, 2020
1 parent c83a81c commit ce12142
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions NEWS.md
Expand Up @@ -39,6 +39,11 @@ Protocol: 31 (unchanged)
also allows you to specify the value via the RSYNC_MAX_ALLOC environment
variable.

- The default systemd config was changed to remove the `ProtectHome=on`
setting since rsync is often used to serve files in /home and this seemed a
bit too strict. Feel free to use `systemctl edit rsync` to add that
restriction to your own setup, if you like.

- The memory allocation functions now automatically check for a failure and
die when out of memory. This eliminated some caller-side check-and-die
code and added some missing sanity-checking of allocations.
Expand Down Expand Up @@ -98,6 +103,11 @@ Protocol: 31 (unchanged)

### ENHANCEMENTS:

- The default systemd config was made a bit stricter by default. For
instance, `ProtectHome=on` was added. You can override this using the
standard `systemctl edit rsync` and add a line to turn that off under a
`[Service]` heading.

- The use of `--backup-dir=STR` now implies `--backup`.

- Added `--zl=NUM` as a short-hand for `--compress-level=NUM`.
Expand Down
2 changes: 1 addition & 1 deletion packaging/systemd/rsync.service
Expand Up @@ -23,7 +23,7 @@ RestartSec=1
# See systemd.unit(5) and search for "drop-in" for full details.

ProtectSystem=full
ProtectHome=on
#ProtectHome=on
PrivateDevices=on
NoNewPrivileges=on

Expand Down
2 changes: 1 addition & 1 deletion packaging/systemd/rsync@.service
Expand Up @@ -23,6 +23,6 @@ StandardError=journal
# See systemd.unit(5) and search for "drop-in" for full details.

ProtectSystem=full
ProtectHome=on
#ProtectHome=on
PrivateDevices=on
NoNewPrivileges=on

0 comments on commit ce12142

Please sign in to comment.