• Serge E. Hallyn's avatar
    user namespace: make signal.c respect user namespaces · 6b550f94
    Serge E. Hallyn authored
    ipc/mqueue.c: for __SI_MESQ, convert the uid being sent to recipient's
    user namespace. (new, thanks Oleg)
    
    __send_signal: convert current's uid to the recipient's user namespace
    for any siginfo which is not SI_FROMKERNEL (patch from Oleg, thanks
    again :)
    
    do_notify_parent and do_notify_parent_cldstop: map task's uid to parent's
    user namespace
    
    ptrace_signal maps parent's uid into current's user namespace before
    including in signal to current.  IIUC Oleg has argued that this shouldn't
    matter as the debugger will play with it, but it seems like not converting
    the value currently being set is misleading.
    
    Changelog:
    Sep 20: Inspired by Oleg's suggestion, define map_cred_ns() helper to
    	simplify callers and help make clear what we are translating
            (which uid into which namespace).  Passing the target task would
    	make callers even easier to read, but we pass in user_ns because
    	current_user_ns() != task_cred_xxx(current, user_ns).
    Sep 20: As recommen...
    6b550f94
mqueue.c 30.6 KB