Displaying 2 results from an estimated 2 matches for "fnamebak".
2002 Jun 21
1
small security-related rsync extension
...\n");
X+ return 0;
X+ }
X+ }
X+ return 1;
X+ }
X+ #endif
X
X /* simple backup creates a backup with a suffix in the same directory */
X static int make_simple_backup(char *fname)
X***************
X*** 46,54 ****
X rsyserr(FERROR, errno, "rename %s to backup %s", fname, fnamebak);
X return 0;
X }
X! } else if (verbose > 1) {
X! rprintf(FINFO,"backed up %s to %s\n",fname,fnamebak);
X }
X return 1;
X }
X
X--- 68,86 ----
X rsyserr(FERROR, errno, "rename %s to backup %s", fname, fnamebak);
X return 0;
X }
X! } else {
X! if...
2008 Feb 15
4
Revised flags patch
...-----
diff -brpu rsync-3.0.0pre9/backup.c rsync-3.0.0pre9-flags/backup.c
--- rsync-3.0.0pre9/backup.c Mon Sep 24 00:19:55 2007
+++ rsync-3.0.0pre9-flags/backup.c Fri Feb 15 19:33:09 2008
@@ -61,7 +61,17 @@ static int make_simple_backup(const char
return 0;
while (1) {
- if (do_rename(fname, fnamebak) == 0) {
+#ifdef SUPPORT_FLAGS
+ STRUCT_STAT st2;
+
+ link_stat(fname, &st2, 0);
+ make_mutable(fname, st2.st_mode, st2.st_flags);
+#endif
+ if (do_rename(fname, fnamebak) == 0)
+ {
+#ifdef SUPPORT_FLAGS
+ undo_make_mutable(fnamebak, st2.st_mode, st2.st_flags);
+#endif
if (verb...