[PATCHv2,3/4] restore: Create temp proc in /tmp

Submitted by Radostin Stoyanov on Nov. 17, 2019, 7:28 a.m.

Details

Message ID 20191117072837.10450-3-rstoyanov1@gmail.com
State Accepted
Series "Series without cover letter"
Commit 780df809881accee3aaf08bf5239a194a270be3e
Headers show

Commit Message

Radostin Stoyanov Nov. 17, 2019, 7:28 a.m.
When restoring a container with user namespace, CRIU fails to create
a temporary directory for proc. The is because the unprivileged user
that has been just restored does not have permissions to access the
working directory used by CRIU.

Resolves #828

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
---
 criu/cr-restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 953f28e45..fad1b3879 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1589,7 +1589,7 @@  static void restore_pgid(void)
 static int mount_proc(void)
 {
 	int fd, ret;
-	char proc_mountpoint[] = "crtools-proc.XXXXXX";
+	char proc_mountpoint[] = "/tmp/crtools-proc.XXXXXX";
 
 	if (root_ns_mask == 0)
 		fd = ret = open("/proc", O_DIRECTORY);