mirror of
https://github.com/sheumann/hush.git
synced 2024-11-19 08:31:11 +00:00
b9ad75fa60
(almost because we do not copy mode, which is probably wasn't intended). +61 bytes.
12 lines
179 B
Plaintext
12 lines
179 B
Plaintext
touch foo
|
|
chmod a-r foo
|
|
set +e
|
|
if test `id -u` = 0; then
|
|
# run as user with nonzero uid
|
|
setuidgid 1 busybox cp foo bar
|
|
else
|
|
busybox cp foo bar
|
|
fi
|
|
set -e
|
|
test ! -f bar
|