aboutsummaryrefslogtreecommitdiff
path: root/bin/setuidgid
blob: be4e0a9716f93e69f81d9975ede7da4e6f2988a0 (plain)
1
2
3
4
5
6
7
#!/bin/sh -e

test "$#" -ge 2 || { echo "setuidgid: too few arguments" 1>&2 ; exit 100 ; }

wd=$(pwd)

exec su -s /bin/sh -p -c "PATH=$PATH ; export PATH ; cd $wd ; exec \"\$0\" \"\$@\"" -- "$@"