• Tycho Andersen's avatar
    lsm: restore lsm bits per tid instead of per pid · 7083fc37
    Tycho Andersen authored
    This is a little tricky, since the threads are forked in the restorer blob, we
    can't open their attr/curent files to pass into the restorer blob. So, we pass
    in an fd for /proc that the restorer blob can use to access the attr/current
    files once they exist.
    
    N.B. this is still incorrect in that it restores the same credentials for all
    threads in the group; however, it matches the behavior of the current creds
    restore code, which also restores the same creds for all threads in the group.
    
    v2: use simple_sprintf() instead of pie_strcat()
    Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    7083fc37
cr-restore.c 66.7 KB