merge branch 'pr-2018'

Lifubang (1):
  add prompt when rootless users have no read access to runc bin

LGTMs: @AkihiroSuda @cyphar
Closes #2018
This commit is contained in:
Aleksa Sarai 2020-05-31 18:41:37 +10:00
commit a30f2556d9
No known key found for this signature in database
GPG Key ID: 9E18AA267DDB8DB4
1 changed files with 3 additions and 1 deletions

View File

@ -119,8 +119,10 @@ static int is_self_cloned(void)
struct statfs fsbuf = {};
fd = open("/proc/self/exe", O_RDONLY|O_CLOEXEC);
if (fd < 0)
if (fd < 0) {
fprintf(stderr, "you have no read access to runc binary file\n");
return -ENOTRECOVERABLE;
}
/*
* Is the binary a fully-sealed memfd? We don't need CLONED_BINARY_ENV for