Linux emulation

Matthew Dillon dillon at apollo.backplane.com
Fri Aug 8 14:51:03 PDT 2003


    All right, I've fixed 'man'.  It was primarily a bug in kern/kern_exec.c
    when I had combined the pcred and the ucred together.  The pcred was 
    always per-process and so the exec code could modify the svuid and svgid.

    But with everything combined in the ucred one has to call cratom() prior
    to modifying the svuid and svgid in order to not accidently modify
    the svuid/svgid belonging to other processes (since ucred can be shared
    across several processes).

    In the case of man it was fork()/exec()'ing the groff stuff and the exec
    in the child process was screwing up the svuid in the parent 'man'
    program, causing it to lose its ability to revert to the 'man' effective
    user id.

						-Matt






More information about the Kernel mailing list