Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imp: run: don't drop real user/group ids in parent
Problem: The IMP run implementation sets the real user and group id of the process to the effective user and group id in the privileged parent, but this makes it so that the invoking user can no longer deliver signals to the IMP parent process. Move the setuid()/setgid() calls to the child process just before execve(2) is called. The parent IMP thereby maintains the real uid/gid of the invoking user and can handle forwarding of signals from that user to the invoked run command. Since the parent IMP process no longer has a real userid of 0/root, update the call that obtains the userid for setting USER and HOME to use the effective uid.
- Loading branch information