• Andrey Vagin's avatar
    restore: rework logic about temporary proc · 2e9ddccd
    Andrey Vagin authored
    We need proc for restoring processes. The existent /proc may be not suitable.
    E.g. If processes are in pidns.
    
    crtools mounts procfs in a temporary directory, but it should be
    umounted at the end. Before this patch crtools did that, but
    it doesn't work if processes in a mount namespace.
    
    Actually this logic can be simplified and this patch does that.
    * create a tmp dir
    * mount procfs
    * open this directory and save a file descriptor.
    * detach procfs
    * remove the tmp dir
    * access to proc via openat, statat and so on.
    Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    2e9ddccd
Name
Last commit
Last update
Documentation Loading commit data...
include Loading commit data...
protobuf Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Makefile Loading commit data...
Makefile.inc Loading commit data...
Makefile.pie Loading commit data...
Makefile.syscall Loading commit data...
README Loading commit data...
cr-check.c Loading commit data...
cr-dump.c Loading commit data...
cr-restore.c Loading commit data...
cr-show.c Loading commit data...
crtools.c Loading commit data...
eventfd.c Loading commit data...
eventpoll.c Loading commit data...
fifo.c Loading commit data...
file-ids.c Loading commit data...
files-reg.c Loading commit data...
files.c Loading commit data...
gen-offsets.sh Loading commit data...
image.c Loading commit data...
inotify.c Loading commit data...
ipc_ns.c Loading commit data...
kcmp-ids.c Loading commit data...
libnetlink.c Loading commit data...
log.c Loading commit data...
mount.c Loading commit data...
namespaces.c Loading commit data...
netfilter.c Loading commit data...
parasite-head-x86-64.S Loading commit data...
parasite-syscall.c Loading commit data...
parasite.c Loading commit data...
pie.lds.S Loading commit data...
pipes.c Loading commit data...
proc_parse.c Loading commit data...
protobuf.c Loading commit data...
pstree.c Loading commit data...
ptrace.c Loading commit data...
rbtree.c Loading commit data...
restorer-log.c Loading commit data...
restorer.c Loading commit data...
shmem.c Loading commit data...
sk-inet.c Loading commit data...
sk-queue.c Loading commit data...
sk-tcp.c Loading commit data...
sk-unix.c Loading commit data...
sockets.c Loading commit data...
syscall-common-x86-64.S Loading commit data...
syscalls-x86-64.sh Loading commit data...
sysctl.c Loading commit data...
util-net.c Loading commit data...
util.c Loading commit data...
uts_ns.c Loading commit data...