search for: preserve_uid

Displaying 19 results from an estimated 19 matches for "preserve_uid".

Did you mean: preserve_gid
2003 Mar 20
2
--link-dest uid/gid checking bug?
...ansferred even though files existed in the compare-dest/link-dest location; compare-dest would detect them but link-dest would make new files anyway. I tracked down my confusion to the new portion of skip_file() in generator.c. Because I wasn't supplying the --owner or --group options, the preserve_uid and preserve_gid flags were not set, and the source file's file->uid and file->gid values were just 0. But skip_file() was checking them against the destination file's st->st_uid and st->st_gid, and reporting the difference. Here's my stab at a patch -- I only just looke...
2011 Jan 11
1
--detect-renamed for mac users : proposition of a modification
...t force_change;" line 33 diff --git a/compat.c b/compat.c --- a/compat.c +++ b/compat.c @@ -42,9 +42,11 @@ extern int checksum_seed; extern int basis_dir_cnt; extern int prune_empty_dirs; extern int protocol_version; +extern int force_change; extern int protect_args; extern int preserve_uid; extern int preserve_gid; b) detect-renamed.diff overlaps the previous hunk of fileflags.diff : line 36 : diff --git a/compat.c b/compat.c --- a/compat.c +++ b/compat.c @@ -42,6 +42,7 @@ extern int checksum_seed; extern int basis_dir_cnt; extern int prune_empty_dirs; extern int protoco...
2002 Mar 12
2
Patch: --drop-suid Remove suid/sgid from target files
...ode &= ~(S_ISUID | S_ISGID); + } #if SUPPORT_LINKS if (S_ISLNK(st.st_mode)) { diff -r --unified rsync-2.5.4pre1-orig/options.c rsync-2.5.4pre1/options.c --- rsync-2.5.4pre1-orig/options.c Thu Feb 28 09:49:57 2002 +++ rsync-2.5.4pre1/options.c Tue Mar 12 22:01:45 2002 @@ -31,6 +31,7 @@ int preserve_uid = 0; int preserve_gid = 0; int preserve_times = 0; +int drop_suid = 0; int update_only = 0; int cvs_exclude = 0; int dry_run=0; @@ -199,6 +200,7 @@ rprintf(F," -g, --group preserve group\n"); rprintf(F," -D, --devices preserve devices (root on...
2003 Apr 08
1
link_dest checks perms despite no -p -o or -g
...return 0; } if (st->st_uid != file->uid || st->st_gid != file->gid) { return 0; } } I think the code should be this instead. if (link_dest) { if(preserve_perms && ((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT))) { return 0; } if ((preserve_uid && (st->st_uid != file->uid)) || (preserve_gid && (st->st_gid != file->gid))) { return 0; } } Tested lightly here, seems to do the right thing. Without this change you pretty much have to be root to use --link-dest. Otherwise if you can't sync owner/gr...
2003 Nov 05
1
--link-dest
...#39;t look at the large picture.) Joe *** generator.c Thu Aug 29 09:44:55 2002 --- ../generator.c Tue Nov 4 09:12:59 2003 *************** *** 42,47 **** --- 42,50 ---- extern int modify_window; extern char *compare_dest; extern int link_dest; + extern int preserve_perms; + extern int preserve_uid; + extern int preserve_gid; /* choose whether to skip a particular file */ *************** *** 51,63 **** if (st->st_size != file->length) { return 0; } ! if (link_dest) { ! if((st->st_mode & ~_S_IFMT) != (file->mode &am...
2006 Jun 02
3
[PATCH] --omit-dir-changes, qsort<>mergesort issues
...nt omit_dir_times; +extern int omit_dir_changes; extern int delete_mode; extern int delete_before; extern int delete_during; @@ -348,10 +349,11 @@ iflags |= ITEM_REPORT_TIME; if ((file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS)) iflags |= ITEM_REPORT_PERMS; - if (preserve_uid && am_root && file->uid != st->st_uid) + if (preserve_uid && am_root && file->uid != st->st_uid + && !(S_ISDIR(st->st_mode) && omit_dir_changes)) iflags |= ITEM_REPORT_OWNER; - if (preserve_gid && file->gid != GID_...
2004 Mar 05
2
Problem with --link-dest when syncing AIX to Linux
...read 189 bytes 102.80 bytes/sec total size is 14 speedup is 0.05 =====> Oooops. Why were file1 and file2 transferred? I did some debugging and found out that the problem seems to be in the function skip_file() in generator.c: if (link_dest) { extern int preserve_perms; extern int preserve_uid; extern int preserve_gid; if(preserve_perms && (st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) return 0; This is always true when rsyncing AIX -> linux, look at this gdb output: (gdb) print /o st->st_mode $13 = 0100644 (gdb) print /o...
2004 Apr 20
1
improved atime patch
...{ @@ -443,6 +450,8 @@ write_longint(f, file->length); if (!(flags & XMIT_SAME_TIME)) write_int(f, modtime); + if (protocol_version > 28 && !(flags & XMIT_SAME_ATIME)) + write_int(f, atime); if (!(flags & XMIT_SAME_MODE)) write_int(f, to_wire_mode(mode)); if (preserve_uid && !(flags & XMIT_SAME_UID)) { @@ -518,6 +527,7 @@ struct file_list *flist, int f) { static time_t modtime; + static time_t atime; static mode_t mode; static uint64 dev; static dev_t rdev; @@ -534,7 +544,7 @@ struct file_struct *file; if (!fptr) { - modtime = 0, mod...
2003 Jun 30
2
--link-dest non-optimal without --owner (or when not root)
If I run rsync 2.5.6 not as root, so that the -o (--owner) and -g (--group) flags don't work, then files that are not owned by me in the source directory will not be linked by --link-dest. When rsync looks in my link-dest, it sees a file owned by me. When it compares that with the source file not owned by me, then rsync thinks it cannot skip that file, and no hard link results. However,
2005 Jul 26
1
itemize() needs to use CHMOD_BITS (patch)
...ime(file->modtime, st->st_mtime) != 0)) iflags |= ITEM_REPORT_TIME; - if (preserve_perms && file->mode != st->st_mode) + if (preserve_perms && (st->st_mode & CHMOD_BITS) + != (file->mode & CHMOD_BITS)) iflags |= ITEM_REPORT_PERMS; if (preserve_uid && am_root && file->uid != st->st_uid) iflags |= ITEM_REPORT_OWNER; -- Roderick Schertler roderick@argon.org
2013 Oct 24
0
patch for combining detect-renamed and fileflags patches (fwd)
...7 @@ + extern int fuzzy_basis; + extern int read_batch; + extern int delay_updates; ++extern int detect_renamed; + extern int checksum_seed; extern int basis_dir_cnt; extern int prune_empty_dirs; - extern int protocol_version; -+extern int detect_renamed; - extern int protect_args; - extern int preserve_uid; - extern int preserve_gid; -@@ -123,6 +124,7 @@ void set_allow_inc_recurse(void) +@@ -125,6 +126,7 @@ allow_inc_recurse = 0; else if (!am_sender && (delete_before || delete_after @@ -61,15 +61,15 @@ diff --git a/delete.c b/delete.c --- a/delete.c +++ b/delete.c -@@ -25,6 +25,...
2001 Sep 01
3
Patch to make rsync preserve access times
...dtime) != 0 && > - !S_ISDIR(st->st_mode)) { > - rprintf(FERROR,"failed to set times on %s : %s\n", > - fname,strerror(errno)); > - return 0; > - } else { > - updated = 1; > - } > - } > - > change_uid = am_root && preserve_uid && st->st_uid != file->uid; > change_gid = preserve_gid && file->gid != (gid_t) -1 && \ > st->st_gid != file->gid; > --- 166,171 ---- > *************** > *** 215,220 **** > --- 205,233 ---- > } > #endif > > +...
2006 Jan 24
1
propagate atimes with rsync-2.6.6 (fwd)
...u.idev) { if (file->F_DEV == dev) { @@ -431,6 +435,8 @@ write_longint(f, file->length); if (!(flags & XMIT_SAME_TIME)) write_int(f, modtime); + if (remote_protocol >= 30) + write_int(f, acctime); if (!(flags & XMIT_SAME_MODE)) write_int(f, to_wire_mode(mode)); if (preserve_uid && !(flags & XMIT_SAME_UID)) { @@ -506,6 +512,7 @@ unsigned short flags, int f) { static time_t modtime; + static time_t acctime; static mode_t mode; static int64 dev; static dev_t rdev; @@ -524,7 +531,7 @@ struct file_struct *file; if (!flist) { - modtime =...
2002 Mar 08
1
[PATCH][RFC] space saving incrementals
...;copy-unsafe-links", 0, POPT_ARG_NONE, &copy_unsafe_links}, {"perms", 'p', POPT_ARG_NONE, &preserve_perms}, + {"compare-perms", 0, POPT_ARG_NONE, &compare_perms}, {"owner", 'o', POPT_ARG_NONE, &preserve_uid}, {"group", 'g', POPT_ARG_NONE, &preserve_gid}, {"devices", 'D', POPT_ARG_NONE, &preserve_devices}, @@ -320,6 +327,7 @@ {"timeout", 0, POPT_ARG_INT, &io_timeout}, {"temp-dir", &...
2002 Sep 10
0
[PATCH] Add --preserve-atime switch to rsync
...e,time_t acctime); int create_directory_path(char *fname); int copy_file(char *source, char *dest, mode_t mode); int robust_unlink(char *fname); *** options.c@@/main/original/1 Tue Apr 9 14:03:18 2002 --- options.c Tue Apr 9 15:59:10 2002 *************** *** 44,49 **** --- 44,50 ---- int preserve_uid = 0; int preserve_gid = 0; int preserve_times = 0; + int preserve_atime = 0; int update_only = 0; int cvs_exclude = 0; int dry_run=0; *************** *** 220,225 **** --- 221,227 ---- rprintf(F," -g, --group preserve group\n"); rprintf(F," -D, --devi...
2004 May 06
2
rsync-2.6.2: NFS clients confused after an rsync
We use rsync to update an nfs server. After an update, we noticed that a large number of clients didn't see the updated data. It took me a while to be able to reliably reproduce this problem, but it happens on old and new versions of rysnc. It also happens across all the platforms we use here (sun/linux/netapp). This shows the problem: [Note my home directory is NFS mounted]
2004 Apr 10
0
patches for copying atimes
...{ @@ -439,6 +446,8 @@ write_longint(f, file->length); if (!(flags & XMIT_SAME_TIME)) write_int(f, modtime); + if (protocol_version > 28 && !(flags & XMIT_SAME_ATIME)) + write_int(f, atime); if (!(flags & XMIT_SAME_MODE)) write_int(f, to_wire_mode(mode)); if (preserve_uid && !(flags & XMIT_SAME_UID)) { @@ -509,6 +518,7 @@ struct file_list *flist, int f) { static time_t modtime; + static time_t atime; static mode_t mode; static DEV64_T rdev, rdev_high; static DEV64_T dev; @@ -524,7 +534,7 @@ struct file_struct *file; if (!fptr) { - mo...
2008 Feb 15
4
Revised flags patch
...\n", fname, fnamebak); diff -brpu rsync-3.0.0pre9/compat.c rsync-3.0.0pre9-flags/compat.c --- rsync-3.0.0pre9/compat.c Sat Jan 26 20:58:17 2008 +++ rsync-3.0.0pre9-flags/compat.c Fri Feb 15 19:33:09 2008 @@ -44,6 +44,7 @@ extern int protocol_version; extern int protect_args; extern int preserve_uid; extern int preserve_gid; +extern int preserve_fileflags; extern int preserve_acls; extern int preserve_xattrs; extern int need_messages_from_generator; @@ -60,7 +61,7 @@ extern iconv_t ic_send, ic_recv; #endif /* These index values are for the file-list's extra-attribute array. */ -int...
2007 Sep 22
0
rsync build on IA64 using icc
...k #1419: external declaration in primary source file extern int am_starting_up; ^ rsync.c(44): remark #1419: external declaration in primary source file extern int allow_8bit_chars; ^ rsync.c(45): remark #1419: external declaration in primary source file extern int preserve_uid; ^ rsync.c(46): remark #1419: external declaration in primary source file extern int preserve_gid; ^ rsync.c(47): remark #1419: external declaration in primary source file extern int inplace; ^ rsync.c(48): remark #1419: external declaration in primary...