[CRIU] LXC DUMP ERROR

Andrew Vagin avagin at parallels.com
Fri Oct 3 06:34:10 PDT 2014


On Fri, Oct 03, 2014 at 05:17:58PM +0400, Pavel Emelyanov wrote:
> > 	if (chroot(TEMP_DIR)<0) {
> > 		fprintf(stderr,"Failed to chroot to %s - %s\n",TEMP_DIR,
> > 						strerror(errno));
> > 		exit(1);
> > 	}
> > 
> 
> If we put chdir("/") here would this escape still work?

No, it would not.
> 
> > 	for(x=0;x<1024;x++) {
> > 		chdir("..");
> > 	}
> > 	chroot(".");
> > 
> > 	if (execl("/bin/sh","-i",NULL)<0) {
> > 		fprintf(stderr,"Failed to exec - %s\n",strerror(errno));
> > 		exit(1);
> > 	}
> 
> 


More information about the CRIU mailing list