install-gosu-binary.sh: install sudo wrapper when executing the script

This commit is contained in:
Jean-Christophe Fillion-Robin
2018-06-06 20:00:46 -04:00
parent 9d4bb8a0eb
commit 2a425ac1ad
3 changed files with 12 additions and 6 deletions

View File

@ -40,3 +40,15 @@ chmod +x /usr/local/bin/gosu
# verify that the binary works
gosu nobody true
cat << EOF >> /usr/bin/sudo
#!/bin/sh
# Emulate the sudo command
exec gosu root:root "\$@"
EOF
chmod +x /usr/bin/sudo

View File

@ -1,5 +0,0 @@
#!/bin/sh
# Emulate the sudo command
exec gosu root:root "$@"