parent
6c929ad26d
commit
074ebfec6c
@ -1,16 +1,2 @@ |
||||
- Modify the following environment variables: (listed in environ(7)) |
||||
* USER -> to target user |
||||
* LOGNAME -> to target user |
||||
* SHELL -> to the target user's SHELL |
||||
* HOME -> to the target user's HOME |
||||
|
||||
- fork before exec, that is because processes might try to kill us or the |
||||
command but since they may run under elevated privileges they will get |
||||
permission denied error. If we remain the parent processes, unprivileged |
||||
proceses can send signals to us and we will relay them to our children |
||||
running at the same privilege as us. This is useful when: |
||||
- The child command hangs and we want to cose it, kinda |
||||
problematic but we could run kill with us as well |
||||
- The parent shell dies and children need to be killed, then |
||||
since one of their children (us) has higher privileges |
||||
they can't kill us and we would end up as zombies |
||||
- Allow for pam-less (native) login, for use with distros wo pam (Alpine) and |
||||
BSDs |
||||
|
Loading…
Reference in new issue