X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/6ac9ce9a46c911cbaa7f3d1c33f49f595373622d..0ef5abcbbb95298fa9faf1d3eb275a9e76e1d951:/usermap.diff diff --git a/usermap.diff b/usermap.diff index 477d59f..a17bac8 100644 --- a/usermap.diff +++ b/usermap.diff @@ -36,9 +36,9 @@ diff --git a/flist.c b/flist.c gid = match_gid(gid, &gid_flags); } } -@@ -2264,8 +2265,13 @@ struct file_list *recv_file_list(int f) - int dstart, flags; +@@ -2248,8 +2249,13 @@ struct file_list *recv_file_list(int f) int64 start_read; + int save_verbose = verbose; - if (!first_flist) + if (!first_flist) { @@ -63,7 +63,7 @@ diff --git a/options.c b/options.c int rsync_port = 0; int compare_dest = 0; int copy_dest = 0; -@@ -384,6 +386,9 @@ void usage(enum logcode F) +@@ -385,6 +387,9 @@ void usage(enum logcode F) rprintf(F," --delay-updates put all updated files into place at transfer's end\n"); rprintf(F," -m, --prune-empty-dirs prune empty directory chains from the file-list\n"); rprintf(F," --numeric-ids don't map uid/gid values by user/group name\n"); @@ -73,7 +73,7 @@ diff --git a/options.c b/options.c rprintf(F," --timeout=SECONDS set I/O timeout in seconds\n"); rprintf(F," --contimeout=SECONDS set daemon connection timeout in seconds\n"); rprintf(F," -I, --ignore-times don't skip files that match in size and mod-time\n"); -@@ -446,7 +451,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, +@@ -447,7 +452,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OPT_SENDER, OPT_EXCLUDE, OPT_EXCLUDE_FROM, OPT_FILTER, OPT_COMPARE_DEST, OPT_COPY_DEST, OPT_LINK_DEST, OPT_HELP, OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW, OPT_MIN_SIZE, OPT_CHMOD, OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_ONLY_WRITE_BATCH, OPT_MAX_SIZE, @@ -82,7 +82,7 @@ diff --git a/options.c b/options.c OPT_SERVER, OPT_REFUSED_BASE = 9000}; static struct poptOption long_options[] = { -@@ -622,6 +627,9 @@ static struct poptOption long_options[] = { +@@ -623,6 +628,9 @@ static struct poptOption long_options[] = { {"no-s", 0, POPT_ARG_VAL, &protect_args, 0, 0, 0}, {"numeric-ids", 0, POPT_ARG_VAL, &numeric_ids, 1, 0, 0 }, {"no-numeric-ids", 0, POPT_ARG_VAL, &numeric_ids, 0, 0, 0 }, @@ -92,7 +92,7 @@ diff --git a/options.c b/options.c {"timeout", 0, POPT_ARG_INT, &io_timeout, 0, 0, 0 }, {"no-timeout", 0, POPT_ARG_VAL, &io_timeout, 0, 0, 0 }, {"contimeout", 0, POPT_ARG_INT, &connect_timeout, 0, 0, 0 }, -@@ -1228,6 +1236,43 @@ int parse_arguments(int *argc_p, const char ***argv_p) +@@ -1229,6 +1237,43 @@ int parse_arguments(int *argc_p, const char ***argv_p) } break; @@ -136,7 +136,7 @@ diff --git a/options.c b/options.c case OPT_HELP: usage(FINFO); exit_cleanup(0); -@@ -2005,6 +2050,18 @@ void server_options(char **args, int *argc_p) +@@ -2007,6 +2052,18 @@ void server_options(char **args, int *argc_p) args[ac++] = "--use-qsort"; if (am_sender) { @@ -158,7 +158,7 @@ diff --git a/options.c b/options.c diff --git a/rsync.yo b/rsync.yo --- a/rsync.yo +++ b/rsync.yo -@@ -378,6 +378,9 @@ to the detailed description below for a complete description. verb( +@@ -382,6 +382,9 @@ to the detailed description below for a complete description. verb( --delay-updates put all updated files into place at end -m, --prune-empty-dirs prune empty directory chains from file-list --numeric-ids don't map uid/gid values by user/group name @@ -168,7 +168,7 @@ diff --git a/rsync.yo b/rsync.yo --timeout=SECONDS set I/O timeout in seconds --contimeout=SECONDS set daemon connection timeout in seconds -I, --ignore-times don't skip files that match size and time -@@ -1620,6 +1623,57 @@ from the source system is used instead. See also the comments on the +@@ -1624,6 +1627,57 @@ from the source system is used instead. See also the comments on the the chroot setting affects rsync's ability to look up the names of the users and groups and what you can do about it. @@ -351,7 +351,7 @@ diff --git a/uidlist.c b/uidlist.c + if (node) + id2 = node->id2; + else if (*name && id) { -+ if (idmap == uidmap) { ++ if (idlist_ptr == &uidlist) { + uid_t uid; + id2 = name_to_uid(name, &uid) ? uid : id; + } else { @@ -372,14 +372,14 @@ diff --git a/uidlist.c b/uidlist.c - - node = add_to_list(&gidlist, id, name, id2, - !am_root && !is_in_group(id2) ? FLAG_SKIP_GROUP : 0); -+ flag = idmap == gidmap && !am_root && !is_in_group(id2) ? FLAG_SKIP_GROUP : 0; ++ flag = idlist_ptr == &gidlist && !am_root && !is_in_group(id2) ? FLAG_SKIP_GROUP : 0; + node = add_to_list(idlist_ptr, id, *name ? name : NULL, id2, flag); if (verbose > 3) { - rprintf(FINFO, "gid %u(%s) maps to %u\n", - (unsigned)id, name ? name : "", (unsigned)id2); + rprintf(FINFO, "%sid %u(%s) maps to %u\n", -+ idmap == uidmap ? "u" : "g", ++ idlist_ptr == &uidlist ? "u" : "g", + (unsigned)id, name, (unsigned)id2); }