[CRIU] [PATCH 12/17] restore: set PR_SET_DUMPABLE to have access to proc files

Andrey Vagin avagin at openvz.org
Fri Oct 31 02:14:30 PDT 2014


It is cleared when a process is forked in a new userns.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-restore.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cr-restore.c b/cr-restore.c
index cdd5dce..e68a906 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1370,6 +1370,11 @@ static int init_userns_creads()
 		return -1;
 	}
 
+	if (prctl(PR_SET_DUMPABLE, 1, 0)) {
+		pr_perror("Unable to set PR_SET_DUMPABLE");
+		exit(1);
+	}
+
 	return 0;
 }
 
-- 
1.9.3



More information about the CRIU mailing list