On 12/15/06, Hugh Daniel <[EMAIL PROTECTED]> wrote:
When run as root the
"chmod-option" test allays fails, and fails across many versions of
Linux, RedHat-7.3, SuSE-10.0, Debian-Etch in the same way.
[Matt snipped here and PGP-unescaped below]
 drwxrwxr-x            0      0.10          3 2006-12-15 21:16:53 .
--rw-rw-r--            0      0.10          1 2006-12-15 21:16:53 ./bar
-drwxrwxr-x            0      0.10          2 2006-12-15 21:16:53 ./foo
+-rw-rw-r--            0      0.0           1 2006-12-15 21:16:53 ./bar
+drwxrwxr-x            0      0.0           2 2006-12-15 21:16:53 ./foo

Indeed, the test is invalid.  The trouble is that the test suite
starts an rsync daemon, instructs it to use uid and gid 0, and expects
files created by the test suite to have the same user/group owners as
those created by the daemon.  This expectation is valid for non-root
users (because the daemon fails to change its uid and gid) and for
root with a default group of root but not for root with a default
group of wheel, as you saw.  The fix is to tell the rsync daemon to
run as the same uid and gid as the user invoking the testsuite.
Wayne, a patch for the test is attached.

Matt
### Eclipse Workspace Patch 1.0
#P rsync
Index: testsuite/rsync.fns
===================================================================
RCS file: /cvsroot/rsync/testsuite/rsync.fns,v
retrieving revision 1.73
diff -u -r1.73 rsync.fns
--- testsuite/rsync.fns	30 May 2006 18:26:17 -0000	1.73
+++ testsuite/rsync.fns	16 Dec 2006 00:10:44 -0000
@@ -237,8 +237,8 @@
 transfer logging = yes
 exclude = foobar.baz
 max verbosity = 9
-uid = 0
-gid = 0
+uid = `id -u`
+gid = `id -g`
 
 [test-from]
 	path = $fromdir
-- 
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