BugReport: rsync fails it's own "regression" test "chmod-option"

Hugh Daniel hugh at road.toad.com
Fri Dec 15 21:43:38 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

  Recent versions of rsync have a "regression test" called
"chmod-option" that when run fails, this should be causing rsync to be
rejected as broken by all distros and sysadmins.

  A bit of research show that no one has mentioned this test since it
was last worked on in late September, nor does it show up as a current
bug anywhere.  The slightly amusing reason for this is that the test
is not run unless one is EUID==root, which in general anyone building
software should not be, and so everyone likely sees the SKIP'ed test
and ignores it.

  Being foolish I happened to notice that the skipped tests wanted root
and decided to run the test suite ("make check") as root as the
software indicated it needed for a full test.  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.
 
  I suspect it's more likely a test failure then a code failure, but
it needs to be fixed just the same before folks like me (paranoid,
pedantic) will accept that the newer versions of rsync are safe and
secure (chmod DOES have security implications...) for deployment.

  I append the entire output of "make check" after my sig.  Just in
case anyone asks, I have no interest in joining any list or web-sites,
which is why this bug report is simple email.

  Thanks for rsync, good luck!

		||ugh Daniel
		hugh at toad.com


"""
# make check
gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W  -c tls.c -o tls.o
gcc -std=gnu99 -g -O2 -DHAVE_CONFIG_H -Wall -W  -o tls tls.o syscall.o lib/compat.o lib/snprintf.o lib/permstring.o -lpopt
gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W  -c getgroups.c -o getgroups.o
gcc -std=gnu99 -g -O2 -DHAVE_CONFIG_H -Wall -W  -o getgroups getgroups.o -lpopt
gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W  -c getfsdev.c -o getfsdev.o
gcc -std=gnu99 -g -O2 -DHAVE_CONFIG_H -Wall -W  -o getfsdev getfsdev.o -lpopt
gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W  -c trimslash.c -o trimslash.o
gcc -std=gnu99 -g -O2 -DHAVE_CONFIG_H -Wall -W  -o trimslash trimslash.o syscall.o lib/compat.o lib/snprintf.o -lpopt
gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W  -c t_unsafe.c -o t_unsafe.o
gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W  -c t_stub.c -o t_stub.o
gcc -std=gnu99 -g -O2 -DHAVE_CONFIG_H -Wall -W  -o t_unsafe t_unsafe.o syscall.o util.o t_stub.o lib/compat.o lib/snprintf.o -lpopt
gcc -std=gnu99 -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W  -c wildtest.c -o wildtest.o
gcc -std=gnu99 -g -O2 -DHAVE_CONFIG_H -Wall -W  -o wildtest wildtest.o lib/compat.o  -lpopt
rsync_bin=`pwd`/rsync ./runtests.sh
============================================================
./runtests.sh running in /usr/local/src/rsync-2.6.9
    rsync_bin=/usr/local/src/rsync-2.6.9/rsync
    srcdir=/usr/local/src/rsync-2.6.9
    testuser=hugh
    os=Linux far.toad.com 2.6.18 #1 PREEMPT Sat Sep 30 12:12:43 PDT 2006 i686 GNU/Linux
    preserve_scratch=no
    scratchbase=/usr/local/src/rsync-2.6.9/testtmp
PASS    00-hello
PASS    backup
PASS    batch-mode
PASS    chgrp
PASS    chmod-option
PASS    chmod-temp-dir
PASS    chmod
SKIP    chown (Can't chown (probably need root))
PASS    compare-dest
PASS    daemon-gzip-download
PASS    daemon-gzip-upload
PASS    daemon
PASS    delete
SKIP    devices (Rsync won't copy devices unless we're root)
PASS    dir-sgid
PASS    duplicates
PASS    exclude
PASS    executability
PASS    fuzzy
PASS    hands
PASS    hardlinks
PASS    itemize
PASS    longdir
PASS    merge
PASS    relative
SKIP    ssh-basic (Skipping SSH tests because $rsync_enable_ssh_tests is not set)
PASS    symlink-ignore
PASS    trimslash
PASS    unsafe-byname
PASS    unsafe-links
PASS    wildmatch
- ------------------------------------------------------------
- ----- overall results:
      28 passed
      3 skipped
- ------------------------------------------------------------
overall result is 0
hugh at far $ so
.bashrc at far.toad.com
root at far # make check
rsync_bin=`pwd`/rsync ./runtests.sh
============================================================
./runtests.sh running in /usr/local/src/rsync-2.6.9
    rsync_bin=/usr/local/src/rsync-2.6.9/rsync
    srcdir=/usr/local/src/rsync-2.6.9
    testuser=root
    os=Linux far.toad.com 2.6.18 #1 PREEMPT Sat Sep 30 12:12:43 PDT 2006 i686 GNU/Linux
    preserve_scratch=no
    scratchbase=/usr/local/src/rsync-2.6.9/testtmp
PASS    00-hello
PASS    backup
PASS    batch-mode
PASS    chgrp
- ----- chmod-option log follows
Testing for symlinks using 'test -h'
Running: "/usr/local/src/rsync-2.6.9/rsync  -avv "/usr/local/src/rsync-2.6.9/testtmp.chmod-option/from/" "/usr/local/src/rsync-2.6.9/testtmp.chmod-option/check/""
building file list ...
done
created directory /usr/local/src/rsync-2.6.9/testtmp.chmod-option/check
delta-transmission disabled for local transfer or --whole-file
./
name1
name2
dir1/
dir2/
total: matches=0  hash_hits=0  false_alarms=0 data=40

sent 260 bytes  received 82 bytes  684.00 bytes/sec
total size is 40  speedup is 0.12
- -------------
check how the directory listings compare with diff:

- -------------
check how the files compare with diff:

- -------------
Running: "/usr/local/src/rsync-2.6.9/rsync  -avv --chmod ug-s,a+rX,D+w "/usr/local/src/rsync-2.6.9/testtmp.chmod-option/from/" "/usr/local/src/rsync-2.6.9/testtmp.chmod-option/to/""
building file list ...
done
created directory /usr/local/src/rsync-2.6.9/testtmp.chmod-option/to
delta-transmission disabled for local transfer or --whole-file
./
name1
name2
dir1/
dir2/
total: matches=0  hash_hits=0  false_alarms=0 data=40

sent 256 bytes  received 82 bytes  676.00 bytes/sec
total size is 40  speedup is 0.12
- -------------
check how the directory listings compare with diff:

- -------------
check how the files compare with diff:

- -------------
        makepath /usr/local/src/rsync-2.6.9/testtmp.chmod-option/to
        makepath /usr/local/src/rsync-2.6.9/testtmp.chmod-option/from/foo
Running: "/usr/local/src/rsync-2.6.9/rsync  -avv "/usr/local/src/rsync-2.6.9/testtmp.chmod-option/from/" "/usr/local/src/rsync-2.6.9/testtmp.chmod-option/check/""
building file list ...
done
created directory /usr/local/src/rsync-2.6.9/testtmp.chmod-option/check
delta-transmission disabled for local transfer or --whole-file
./
bar
foo/
total: matches=0  hash_hits=0  false_alarms=0 data=0

sent 133 bytes  received 54 bytes  374.00 bytes/sec
total size is 0  speedup is 0.00
- -------------
check how the directory listings compare with diff:

- -------------
check how the files compare with diff:

- -------------
Running: "/usr/local/src/rsync-2.6.9/rsync  -avv --chmod=Fo-x "/usr/local/src/rsync-2.6.9/testtmp.chmod-option/from/" "/usr/local/src/rsync-2.6.9/testtmp.chmod-option/to/""
building file list ...
done
delta-transmission disabled for local transfer or --whole-file
bar
foo/
total: matches=0  hash_hits=0  false_alarms=0 data=0

sent 133 bytes  received 54 bytes  374.00 bytes/sec
total size is 0  speedup is 0.00
- -------------
check how the directory listings compare with diff:

- -------------
check how the files compare with diff:

- -------------
building configuration /usr/local/src/rsync-2.6.9/testtmp.chmod-option/test-rsyncd.conf
        makepath /usr/local/src/rsync-2.6.9/testtmp.chmod-option/to
Running: "/usr/local/src/rsync-2.6.9/rsync  -rtvv "/usr/local/src/rsync-2.6.9/testtmp.chmod-option/from/" localhost::test-incoming-chmod/"
Using RSYNC_CONNECT_PROG instead of opening tcp connection to localhost port 873
Running socket program: "/usr/local/src/rsync-2.6.9/rsync  --config=/usr/local/src/rsync-2.6.9/testtmp.chmod-option/test-rsyncd.conf --daemon"
opening connection using --server -vvtr . test-incoming-chmod/
building file list ...
done
delta-transmission enabled
bar
foo/
total: matches=0  hash_hits=0  false_alarms=0 data=0

sent 108 bytes  received 50 bytes  316.00 bytes/sec
total size is 0  speedup is 0.00
- -------------
check how the directory listings compare with diff:

- --- /usr/local/src/rsync-2.6.9/testtmp.chmod-option/ls-from     2006-12-15 13:16:54.000000000 -0800
+++ /usr/local/src/rsync-2.6.9/testtmp.chmod-option/ls-to       2006-12-15 13:16:54.000000000 -0800
@@ -1,3 +1,3 @@
 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
- -------------
check how the files compare with diff:

- -------------
- ----- chmod-option log ends
- ----- chmod-option rsyncd.log follows
2006/12/15 13:16:53 [29160] connect from localhost.localdomain (127.0.0.1)
2006/12/15 13:16:53 [29160] rsync to test-incoming-chmod/ from localhost.localdomain (127.0.0.1)
2006/12/15 13:16:53 [29160] receiving file list
2006/12/15 13:16:53 [29160] delta-transmission enabled
2006/12/15 13:16:53 [29160] >f+++++++ localhost.localdomain [127.0.0.1] test-incoming-chmod () 0 bar
2006/12/15 13:16:53 [29160] cd+++++++ localhost.localdomain [127.0.0.1] test-incoming-chmod () 4096 foo
2006/12/15 13:16:54 [29160] sent 109 bytes  received 113 bytes  total size 0
- ----- chmod-option rsyncd.log ends
FAIL    chmod-option
PASS    chmod-temp-dir
PASS    chmod
PASS    chown
PASS    compare-dest
PASS    daemon-gzip-download
PASS    daemon-gzip-upload
PASS    daemon
PASS    delete
PASS    devices
PASS    dir-sgid
PASS    duplicates
PASS    exclude
PASS    executability
PASS    fuzzy
PASS    hands
PASS    hardlinks
PASS    itemize
PASS    longdir
PASS    merge
PASS    relative
SKIP    ssh-basic (Skipping SSH tests because $rsync_enable_ssh_tests is not set)
PASS    symlink-ignore
PASS    trimslash
PASS    unsafe-byname
PASS    unsafe-links
PASS    wildmatch
- ------------------------------------------------------------
- ----- overall results:
      29 passed
      1 failed
      1 skipped
- ------------------------------------------------------------
overall result is 1
make: *** [check] Error 1
# echo $?
2
# 
"""

-----BEGIN PGP SIGNATURE-----
Comment: For the matching public key, finger the Reply-To: address.

iQCVAwUBRYMWz1ZpdJR7FBQRAQJWqQP+M1EET4Ox9TiGNVmRIY/Nc0QgdVu1kC9S
NoJKSEkHH85UgO6g2uJt6z+WhBn5EXoFWCtwXq1Jy5yvxE82pybymxmCBNu7o1QC
Y1nfRUBxvv6oia9BI0Y65nEGSVekttE7ptTQlg7dU6JGwZlytRJtZoJGHN3AgZE1
YgGoHdZ+Rwo=
=SfIi
-----END PGP SIGNATURE-----


More information about the rsync mailing list