aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt McCutchen <matt@mattmccutchen.net>2010-03-17 00:53:42 -0400
committerWayne Davison <wayned@samba.org>2010-07-03 09:19:01 -0700
commitf532cede11d2d4df575bc7767ea1c7373b0d988b (patch)
tree5ead414d3a49f59cd08ff6eda54ddc166fb1fd78
parent05022e00a2cb5ba8b994c1f11ebe501efa2f0114 (diff)
downloadandroid_external_rsync-f532cede11d2d4df575bc7767ea1c7373b0d988b.tar.gz
android_external_rsync-f532cede11d2d4df575bc7767ea1c7373b0d988b.tar.bz2
android_external_rsync-f532cede11d2d4df575bc7767ea1c7373b0d988b.zip
In "ignoring unsafe symlink" messages, show only the file-list path.
Rsync was showing the full destination path, which was confusing because nothing is created at that path and was especially bogus in combination with the source name of a solo file. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506830
-rw-r--r--backup.c4
-rw-r--r--generator.c9
2 files changed, 8 insertions, 5 deletions
diff --git a/backup.c b/backup.c
index 7512d921..d9181465 100644
--- a/backup.c
+++ b/backup.c
@@ -309,8 +309,8 @@ static int keep_backup(const char *fname)
const char *sl = F_SYMLINK(file);
if (safe_symlinks && unsafe_symlink(sl, fname)) {
if (verbose) {
- rprintf(FINFO, "ignoring unsafe symlink %s -> %s\n",
- full_fname(buf), sl);
+ rprintf(FINFO, "not backing up unsafe symlink \"%s\" -> \"%s\"\n",
+ fname, sl);
}
kept = 1;
} else {
diff --git a/generator.c b/generator.c
index f1fdcddd..3467cfa8 100644
--- a/generator.c
+++ b/generator.c
@@ -1532,11 +1532,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
const char *sl = F_SYMLINK(file);
if (safe_symlinks && unsafe_symlink(sl, fname)) {
if (verbose) {
- if (solo_file)
+ if (solo_file) {
+ /* fname contains the destination path, but we
+ * want to report the source path. */
fname = f_name(file, NULL);
+ }
rprintf(FINFO,
- "ignoring unsafe symlink %s -> \"%s\"\n",
- full_fname(fname), sl);
+ "ignoring unsafe symlink \"%s\" -> \"%s\"\n",
+ fname, sl);
}
return;
}