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

This commit is contained in:
Jean-Christophe Fillion-Robin committed 2018-06-09 00:07:33 -04:00
1 parent 9d4bb8a0eb
commit 2a425ac1ad
3 files changed
+12 -6

No files matched your search

+12
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
-5
View File
@@ -1,5 +0,0 @@
#!/bin/sh
# Emulate the sudo command
exec gosu root:root "$@"