search for: keep_name

Displaying 7 results from an estimated 7 matches for "keep_name".

Did you mean: cpep_name
2002 Mar 27
2
rsync-2.5.4:backup.c possible bug
...To identify too-long pathnames, it makes the following test: if (strlen(backup_dir) + strlen(fname) > (MAXPATHLEN - 1)) I think that the constant subtracted off should be 2, to account both for the forward-slash and for the trailing zero in the following snprintf statement, line 211: snprintf(keep_name, sizeof (keep_name), "%s/%s", backup_dir, fname); Notice that (line 178) keep_name is an array of MAXPATHLEN characters. Another (perhaps more logical) possible fix would be to make keep_name MAXPATHLEN+1 characters long. It depends whether MAXPATHLEN was intended to count the trailing...
2002 Dec 09
1
when using --backup-dir: why not make_bak_dir() . . .
here (in keep_backup())? --- backup.c.orig Mon Dec 9 17:02:36 2002 +++ backup.c Mon Dec 9 17:03:50 2002 @@ -273,6 +273,7 @@ /* move to keep tree if a file */ if(!kept) { + make_bak_dir(fname,backup_dir); if (!robust_move (fname, keep_name)) rprintf(FERROR, "keep_backup failed %s -> %s : %s\n", fname, keep_name, strerror(errno)); this reconstructs parent directory permissions more in keeping with my (humble) expectations, in addition to being consistent with the way all ~S_IFREG links' parents are produced j...
2002 Jun 21
1
small security-related rsync extension
...v_backups && strip_perm(fnamebak) == 0) { X! return 0; X! } else if (verbose > 1) { X! rprintf(FINFO,"Stripped setuid and/or setgid from %s\n",fnamebak); X! } X! #endif X } X+ X return 1; X } X X*************** X*** 271,276 **** X--- 303,314 ---- X fname, keep_name, strerror(errno)); X }; X set_perms (keep_name, file, NULL, 0); X+ /* may mean an extra stat */ X+ #ifdef HAVE_CHMOD X+ if (!priv_backups && strip_perm(keep_name) == 0) { X+ return 0; X+ } X+ #endif X free_file (file); X free (file); X SHAR_EOF $TOUCH -am 06211315102 backup-p...
2002 Apr 02
2
Handling of backup files - two new features proposed
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dear list members, there are two new rsync-features I made up and would like to discuss with you. If you think these new features might be useful for the whole rsync-community, please give me a note and I'll send you the patches (or post them here). 1.) Setting owner and/or group of backup files. In our servers I'm using rsync to backup
2001 Sep 19
3
permissions bug w/ --backup-dir or --backup option?
Running rsync 2.4.7pre1, using the --backup-dir option, I just realized today that file ownerships and permissions of backed up files are not preserved. In other words, if rsync moves an obsolete file to the backup dir, it's ownership seems to revert to root:root, and permissions change, as well. We are also using the -a (archive) option, by the way, which should mean "preserve
2003 Sep 05
1
new option suggestion '--backup-only'
...rrno; switch (errno) { /* external filesystem */ case EXDEV: @@ -225,7 +231,8 @@ } } kept = 1; - do_unlink(fname); + if (!backup_only) + do_unlink(fname); } #endif @@ -233,11 +240,11 @@ /* make an empty directory */ make_bak_dir(fname, backup_dir); do_mkdir(keep_name, file->mode); - ret_code = do_rmdir(fname); - if(verbose>2) { - rprintf(FINFO, "make_backup : RMDIR %s returns %i\n", - fname, ret_code); + if (!backup_only) { + ret_code=do_rmdir(fname); + if(verbose>2) + rprintf(FINFO,"make_backup : RMDIR %s returns %i\...
2004 Feb 06
4
memory reduction
..._backup(char *fname) if (do_stat(fname, &st)) return 1; #endif - file = make_file(fname, NO_EXCLUDES); + file = make_file(fname, NULL, NO_EXCLUDES); /* the file could have disappeared */ if (!file) return 1; @@ -282,7 +283,7 @@ static int keep_backup(char *fname) } } set_perms(keep_name, file, NULL, 0); - free_file(file, FREE_STRUCT); + free(file); if (verbose > 1) rprintf(FINFO, "keep_backup %s -> %s\n", fname, keep_name); diff -rupNP --exclude-from cvs/.ignore cvs/batch.c pool2/batch.c --- cvs/batch.c Thu Feb 5 20:47:31 2004 +++ pool2/batch.c Thu Feb 5 2...