mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-03-09 01:46:59 -04:00
that makes it incompatible with all prior versions. A patch will be provided to allow talking with older (patched) rsync versions.
40 lines
964 B
Bash
40 lines
964 B
Bash
#! /bin/sh
|
|
|
|
# This program is distributable under the terms of the GNU GPL (see
|
|
# COPYING).
|
|
|
|
# Test that rsync handles basic ACL preservation.
|
|
|
|
. $srcdir/testsuite/rsync.fns
|
|
|
|
$RSYNC --version | grep ", ACLs" >/dev/null || test_skipped "Rsync is configured without ACL support"
|
|
|
|
case "$RSYNC" in
|
|
*protocol=29*) test_skipped "ACLs require protocol 30" ;;
|
|
esac
|
|
|
|
case "$setfacl_nodef" in
|
|
true) test_skipped "I don't know how to use your setfacl command" ;;
|
|
esac
|
|
|
|
makepath "$fromdir/foo"
|
|
echo something >"$fromdir/file1"
|
|
echo else >"$fromdir/file2"
|
|
|
|
files='foo file1 file2'
|
|
|
|
setfacl -m u:0:7 "$fromdir/foo" || test_skipped "Your filesystem has ACLs disabled"
|
|
setfacl -m u:0:5 "$fromdir/file1"
|
|
setfacl -m u:0:5 "$fromdir/file2"
|
|
|
|
$RSYNC -avvA "$fromdir/" "$todir/"
|
|
|
|
cd "$fromdir"
|
|
getfacl $files >"$scratchdir/acls.txt"
|
|
|
|
cd "$todir"
|
|
getfacl $files | diff $diffopt "$scratchdir/acls.txt" -
|
|
|
|
# The script would have aborted on error, so getting here means we've won.
|
|
exit 0
|