Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
b3fbe3ce
Commit
b3fbe3ce
authored
Apr 24, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The chown script now has a --fake-super mode if the script name has
"fake" in it. Added a symlink named chown-fake.test.
parent
9557eaba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
11 deletions
+34
-11
chown.test
testsuite/chown.test
+34
-11
No files found.
testsuite/chown.test
View file @
b3fbe3ce
...
...
@@ -13,13 +13,38 @@
.
"
$suitedir
/rsync.fns"
case
`id -u`
in
''
)
;;
# If "id" failed, try to continue...
0
)
;;
*
)
if
[
-
f
/
usr
/
bin
/
fakeroot
];
then
echo
"Let's try re-running the script under fakeroot..."
exec
/
usr
/
bin
/
fakeroot
/
bin
/
sh
"$0"
fi
case
$
0
in
*
fake
*
)
$RSYNC
--
version
|
grep
", xattrs"
>/
dev
/
null
||
test_skipped
"Rsync needs xattrs for fake device tests"
RSYNC
=
"
$RSYNC
--fake-super"
TLS_ARGS
=--
fake
-
super
case
"`xattr 2>&1`"
in
*--
list
:*
)
chown
()
{
own
=
$
1
shift
xattr
-
s
'rsync.%stat'
"100644 0,0
$own
"
"${@}"
}
;;
*
)
chown
()
{
own
=
$
1
shift
setfattr
-
n
'user.rsync.%stat'
-
v
"100644 0,0
$own
"
"${@}"
}
;;
esac
;;
*
)
case
`id -u`
in
''
)
;;
# If "id" failed, try to continue...
0
)
;;
*
)
if
[
-
f
/
usr
/
bin
/
fakeroot
];
then
echo
"Let's try re-running the script under fakeroot..."
exec
/
usr
/
bin
/
fakeroot
/
bin
/
sh
"$0"
fi
;;
esac
;;
esac
...
...
@@ -31,10 +56,8 @@ name2="$fromdir/name2"
echo
"This is the file"
>
"
$name1
"
echo
"This is the other file"
>
"
$name2
"
chown
5000
"
$name1
"
||
test_skipped
"Can't chown (probably need root)"
chown
5001
"
$name2
"
||
test_skipped
"Can't chown (probably need root)"
chgrp
5002
"
$name1
"
||
test_skipped
"Can't chgrp (probably need root)"
chgrp
5003
"
$name2
"
||
test_skipped
"Can't chgrp (probably need root)"
chown
5000
:
5002
"
$name1
"
||
test_skipped
"Can't chown (probably need root)"
chown
5001
:
5003
"
$name2
"
||
test_skipped
"Can't chown (probably need root)"
cd
"
$fromdir
/.."
checkit
"
$RSYNC
-aHvv from/ to/"
"
$fromdir
"
"
$todir
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment