Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved the unsafe_symlink() code to not get fooled by extra '/' chars
[rsync/rsync.git]
/
backup.c
diff --git
a/backup.c
b/backup.c
index
a81f947
..
0da6b33
100644
(file)
--- a/
backup.c
+++ b/
backup.c
@@
-284,7
+284,7
@@
int make_backup(const char *fname, BOOL prefer_rename)
#ifdef SUPPORT_LINKS
if (!ret && preserve_links && S_ISLNK(file->mode)) {
const char *sl = F_SYMLINK(file);
#ifdef SUPPORT_LINKS
if (!ret && preserve_links && S_ISLNK(file->mode)) {
const char *sl = F_SYMLINK(file);
- if (safe_symlinks && unsafe_symlink(sl,
buf
)) {
+ if (safe_symlinks && unsafe_symlink(sl,
fname
)) {
if (INFO_GTE(SYMSAFE, 1)) {
rprintf(FINFO, "ignoring unsafe symlink %s -> %s\n",
full_fname(buf), sl);
if (INFO_GTE(SYMSAFE, 1)) {
rprintf(FINFO, "ignoring unsafe symlink %s -> %s\n",
full_fname(buf), sl);