Matt Kraai | 14b7c5d | 2001-12-11 16:43:48 +0000 | [diff] [blame] | 1 | touch foo |
2 | chmod a-r foo | ||||
Eric Andersen | 650fe63 | 2004-04-06 11:10:30 +0000 | [diff] [blame] | 3 | set +e |
Denis Vlasenko | b9ad75f | 2008-03-28 17:49:31 +0000 | [diff] [blame] | 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 | ||||
Eric Andersen | 650fe63 | 2004-04-06 11:10:30 +0000 | [diff] [blame] | 10 | set -e |
Matt Kraai | 14b7c5d | 2001-12-11 16:43:48 +0000 | [diff] [blame] | 11 | test ! -f bar |