X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/3f8612ce2569c52e9bf7f614c4555eb311a462c5..9a7eef964a2e3389ffd3537302f80ca42cfe9239:/id-pair.diff diff --git a/id-pair.diff b/id-pair.diff index bc0fda6..90df970 100644 --- a/id-pair.diff +++ b/id-pair.diff @@ -8,8 +8,8 @@ This only saves 4 bytes per file (not counting the overhead of the array). This probably needs a hashing algorithm to be added if the uid+gid list gets to be really large. ---- orig/flist.c 2006-01-31 02:30:18 -+++ flist.c 2006-01-26 10:56:31 +--- old/flist.c ++++ new/flist.c @@ -60,6 +60,7 @@ extern int protocol_version; extern int sanitize_paths; extern const char *io_write_phase; @@ -98,8 +98,8 @@ gets to be really large. *gidbuf = '\0'; if (!am_sender) sprintf(depthbuf, "%d", file->dir.depth); ---- orig/generator.c 2006-01-31 02:30:18 -+++ generator.c 2006-01-25 17:39:42 +--- old/generator.c ++++ new/generator.c @@ -91,6 +91,7 @@ extern dev_t filesystem_dev; extern char *backup_dir; extern char *backup_suffix; @@ -132,9 +132,9 @@ gets to be really large. if (S_ISREG(file->mode) && file->length != st->st_size) iflags |= ITEM_REPORT_SIZE; -@@ -352,10 +357,10 @@ void itemize(struct file_struct *file, i - if (preserve_perms - && (file->mode & CHMOD_BITS) != (st->st_mode & CHMOD_BITS)) +@@ -351,10 +356,10 @@ void itemize(struct file_struct *file, i + 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 && uid != st->st_uid) @@ -146,17 +146,17 @@ gets to be really large. iflags |= ITEM_REPORT_GROUP; } else iflags |= ITEM_IS_NEW; ---- orig/rsync.c 2006-01-31 02:30:18 -+++ rsync.c 2006-01-25 17:26:06 -@@ -40,6 +40,7 @@ extern int inplace; +--- old/rsync.c ++++ new/rsync.c +@@ -49,6 +49,7 @@ extern int inplace; extern int keep_dirlinks; extern int make_backups; extern struct stats stats; +extern struct id_pair *id_pairs; - - /* -@@ -78,6 +79,8 @@ int set_file_attrs(char *fname, struct f + #if defined HAVE_ICONV_OPEN && defined HAVE_ICONV_H + iconv_t ic_chck = (iconv_t)-1; +@@ -116,6 +117,8 @@ int set_file_attrs(char *fname, struct f int updated = 0; STRUCT_STAT st2; int change_uid, change_gid; @@ -165,7 +165,7 @@ gets to be really large. if (!st) { if (dry_run) -@@ -104,9 +107,11 @@ int set_file_attrs(char *fname, struct f +@@ -148,9 +151,11 @@ int set_file_attrs(char *fname, struct f updated = 1; } @@ -180,7 +180,7 @@ gets to be really large. #if !defined HAVE_LCHOWN && !defined CHOWN_MODIFIES_SYMLINK if (S_ISLNK(st->st_mode)) ; -@@ -118,18 +123,18 @@ int set_file_attrs(char *fname, struct f +@@ -162,18 +167,18 @@ int set_file_attrs(char *fname, struct f rprintf(FINFO, "set uid of %s from %ld to %ld\n", fname, @@ -203,8 +203,8 @@ gets to be really large. /* shouldn't have attempted to change uid or gid * unless have the privilege */ rsyserr(FERROR, errno, "%s %s failed", ---- orig/rsync.h 2006-01-30 20:39:09 -+++ rsync.h 2006-01-25 17:15:44 +--- old/rsync.h ++++ new/rsync.h @@ -493,6 +493,11 @@ struct hlink { int hlindex; }; @@ -227,8 +227,8 @@ gets to be really large. mode_t mode; uchar flags; /* this item MUST remain last */ }; ---- orig/uidlist.c 2006-01-25 17:15:13 -+++ uidlist.c 2006-01-25 17:31:20 +--- old/uidlist.c ++++ new/uidlist.c @@ -37,6 +37,8 @@ extern int preserve_gid; extern int numeric_ids; extern int am_root;