Instead, it starts a new shell process with the new user ID. The original shell is blocked until the new shell completes and su exits. Why does it work like this?
|
|
Simple: because it can't. There is no system call to change the uid of another process. If you don't want to leave the parent shell around waiting for |
|||
|
|
|
As has been pointed out, there is no way to do it. Of course, if there is a will, there is a way: that there is no such syscall is no reason why it couldn't be done. That said, as @mtk touched on, imagine the havoc it could create having a syscall to change the security context of an unrelated process. If nothing else, I see a race condition erupting in three... two... one... (and let's not even get started on what changing the security context of One other reason is that |
|||
|
|