Description of problem:
Under SELinux, sudo runs things via "sesh", forks and execs the command and
waits for its result. This does not cope with the command stopping for job control.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. sudo -s
2. Type "suspend" in subshell
3. See it sit there.
The whole sudo command is suspended and reports to the containing shell.
There was a change to sesh.c to make it fork and wait rather than just exec.
I don't understand why that was needed. If it just exec'd that would do the
SELinux transition magic I would think, and it would deal with job control
correctly. If it needs to fork for some reason I don't understand, then it
needs to use WUNTRACED in its waitpid call, and propagate a stop signal by
raising it for sesh itself.
Created attachment 116438 [details]
Patch making sesh handling child signals better.
Please put this patch in unless you have something better.
This makes sesh handle stop signals properly, fixing this bug.
It also makes it exit with a useful status for a child killed by a signal,
matching what the shell would do if "sh -c" were used instead of sesh.
Created attachment 116443 [details]
Replacement patch that actually works.
The patch added to FC5.
From User-Agent: XML-RPC
sudo-1.6.8p8-2.3 has been pushed for FC4, which should resolve this issue. If these problems are still present in this version, then please make note of it in this bug report.