mirror of
https://github.com/troglobit/libite.git
synced 2026-11-14 19:03:05 +00:00
Do not let rsync() write through symlinks in the destination
With LITE_FOPT_RSYNC_LINKS, rsync() leaves symlinks in the destination. If the source later has a regular file or a directory by the same name, the next run follows the old link and writes to whatever it points at, which can be outside the destination tree. Remove such a link before copying. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
3 files changed
+82
-10
No files matched your search
@@ -250,6 +250,10 @@ Generic Functions
|
||||
gets a copy of what they point to. With `LITE_FOPT_RSYNC_LINKS` a
|
||||
symlink to a file, or a dangling symlink, is recreated in the
|
||||
destination instead. Symlinks to directories are always followed.
|
||||
|
||||
With `LITE_FOPT_RSYNC_LINKS` a symlink in the destination is never
|
||||
followed. If one sits where a file or directory from the source
|
||||
goes, it is removed first.
|
||||
|
||||
In releases prior to v2.0 the argument controlling pruning was called
|
||||
`delete`, it is now called `opt`. The APIs are 100% compatible if the
|
||||
|
||||
Reference in new issue
Block a user