criu/include
Pavel Emelyanov beb158a66e cr: Task creds support
Dumping is simple. All but secbits can be read from proc, secbits
are got from parasite.

Restoring is a bit tricky -- when you change anything on kernel
cred's struct it performs sophisticated checks and can change
some more stuff than requested, so the creds restoration procedure
is carefully commented step-by-step.

Another thing to mention is that creds are restored after everything
else, i.e. right before performing final threads sync and sigreturns.
This is done to avoid potential problems with insufficient caps for
restoring other stuff (e.g. CAP_DAC_OVERRIDE or zero euid is most
likely required for opening any image file and the notorious control
/proc/sys/kernel/ns_last_pid, which in turn is performed till the
very last moment).

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
2012-01-30 13:00:50 +04:00
..
atomic.h Gather futex helpers into lock.h 2011-12-26 23:54:18 +04:00
bitops.h restore: Add mutexes via futex syscall and order threads creation 2011-11-18 16:09:01 +04:00
compiler.h Add ALIGN helper 2011-11-16 18:16:12 +04:00
crtools.h cr: Task creds support 2012-01-30 13:00:50 +04:00
files.h restore: Learn to work with shared struct file-s 2012-01-11 16:01:44 +04:00
image.h cr: Task creds support 2012-01-30 13:00:50 +04:00
inet_diag.h sockets: Rename struct inet_diag_req to inet_diag_req_v2 2012-01-20 16:40:56 +04:00
libnetlink.h net: Define named constant for nlmsg_seq 2011-12-27 20:13:18 +04:00
list.h Initial commit 2011-09-23 12:00:45 +04:00
lock.h lock: add a new primitive cr_wait_until_greater (v2) 2012-01-19 16:16:58 +04:00
log.h Move logging functions to log.c 2011-12-19 18:52:50 +04:00
namespaces.h ns: Support UTS namespace 2012-01-26 16:54:22 +04:00
parasite-syscall.h parasite: Dump misc command 2012-01-30 12:59:54 +04:00
parasite.h cr: Task creds support 2012-01-30 13:00:50 +04:00
proc_parse.h proc_parse: Routine for reading creds from /proc/pid/status 2012-01-30 13:00:18 +04:00
ptrace.h dump: Drop unneeded #includes 2011-12-19 23:18:17 +04:00
restorer-log.h restorer: move log descriptor from crtools (v2) 2012-01-17 18:08:03 +03:00
restorer.h cr: Task creds support 2012-01-30 13:00:50 +04:00
sockets.h show: inet sockets dump parsing support added 2012-01-18 12:39:04 +04:00
syscall-codes.h syscalls: Prepare syscalls and bits for (mostly) setting creds 2012-01-30 13:00:33 +04:00
syscall.h syscalls: Prepare syscalls and bits for (mostly) setting creds 2012-01-30 13:00:33 +04:00
types.h syscalls: Prepare syscalls and bits for (mostly) setting creds 2012-01-30 13:00:33 +04:00
unix_diag.h sockets: Update unix_diag.h 2012-01-10 17:26:50 +04:00
util.h crtools: R/W API rewrite 2012-01-23 01:43:10 +04:00