• Sophie Blee-Goldman's avatar
    Dump capabilities from the parasite · e606c214
    Sophie Blee-Goldman authored
    Needed for future user namespace support. Capabilities will have to be
    dumped from the parasite, ie from inside the namespace since there is no
    obvious way to 'translate' capabilities from the global namespace (unlike
    with uids and gids, where the id mappings can be used for translation).
    
    [ additional explanation from Andrew Vagin:
    
    "capabilities" are not translated between namespaces. They can exist
    only in one userns, where a process lives. If a process is created in a
    new userns, it gets a full set of capabilities in this userns, and
    loses all caps in a parent userns.
    
    So if capabilities are not shown in /proc/pid/stat, we have no way to
    get it except of using parasite code. ]
    Signed-off-by: 's avatarSophie Blee-Goldman <ableegoldman@google.com>
    Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    e606c214
parasite-syscall.c 27.6 KB