Gitiles
Code Review
Sign In
192.168.1.100
/
T106_DC
/
9ed821d7e5d875a3395740a9cc2545671fa429b7
/
.
/
ap
/
app
/
busybox
/
src
/
testsuite
/
cp
/
cp-does-not-copy-unreadable-file
blob: e17e8e66dd72f70b2c48e11fc4e46a629cca5a94 [
file
] [
log
] [
blame
]
lh
9ed821d
2023-04-07 01:36:19 -0700
[
diff
] [
blame^
]
1
touch foo
2
chmod a
-
r foo
3
set
+
e
4
if
test
`id -u`
=
0
;
then
5
# run as user with nonzero uid
6
setuidgid
1
busybox cp foo bar
7
else
8
busybox cp foo bar
9
fi
10
set
-
e
11
test
!
-
f bar