Hello!

I think there is a small bug in cmdline parsing for option usermap and
groupmap. If you give multiple mappings to --usermap or --groupmap, only
the first one is used.

Example: rsync -a --usermap=userA:userB,userC:userD <src> <dst>
-> Only the user mapping for userA to userB is used, the second mapping is 
ignored.

The attached patch fixed the problem for me.

Greetings Dieter
--- uidlist.c.orig	2013-01-19 20:05:53.000000000 +0100
+++ uidlist.c	2014-01-12 15:36:55.000000000 +0100
@@ -473,9 +473,10 @@
 					usernames ? "user" : "group", cp);
 				exit_cleanup(RERR_SYNTAX);
 			}
-			if (dash)
+			if (dash) {
 				noiu.max_id = id_parse(dash+1);
-			else
+				*dash= '\0';
+			} else
 				noiu.max_id = 0;
 			flags = 0;
 			id1 = id_parse(cp);
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to