mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
Add "--checksum" in rsync when using "--force"
If the user don't put that option in rsync_options using of "--force" could be unsafe. While the probability of failures because of this are low they aren't zero.
This commit is contained in:
committed by
Ian Barwick
parent
1803a16c7e
commit
eabb3cb1ab
2
repmgr.c
2
repmgr.c
@@ -1922,7 +1922,7 @@ copy_remote_files(char *host, char *remote_user, char *remote_path,
|
|||||||
maxlen_snprintf(rsync_flags, "%s", options.rsync_options);
|
maxlen_snprintf(rsync_flags, "%s", options.rsync_options);
|
||||||
|
|
||||||
if (runtime_options.force)
|
if (runtime_options.force)
|
||||||
strcat(rsync_flags, " --delete");
|
strcat(rsync_flags, " --delete --checksum");
|
||||||
|
|
||||||
if (!remote_user[0])
|
if (!remote_user[0])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user