On Fri, Mar 12, 2010 at 11:33:39AM -0800, Renee Danson Sommerfeld wrote:
> On Fri, Mar 12, 2010 at 11:22:01AM -0800, Michael Hunter wrote:
> > webrev in /net/coupe.eng/builds/mph/nwam-bug/
> 
> Looks good.

Wait, I just thought about this more.

I believe this probably works, but the comment ("opening /dev/dld...
takes all privs") doesn't match what you're actually doing (becoming
root).

Since you just explained to me why that is on the phone, I'll elaborate
a bit what we think the right answer is: the current code to escalate
privs is called from within nwamd_to_root(); nwamd_to_root() also does
reference counting so that different threads can't screw each other up.
The escalate privs function does *not* do the appropriate reference
counting, and so should not be called directly.

Your solution, which I think is reasonable, is to remove the escalate
privs function and just make that part of the to_root() function, and
add a bit of clarification to the comment in nwamd_plumb_interface().

Thanks!
renee

Reply via email to