add prompt when rootless users have no read access to runc bin
Signed-off-by: Lifubang <lifubang@acmcoder.com>
This commit is contained in:
parent
7341c22d46
commit
2e8efc1bc7
|
@ -95,8 +95,10 @@ static int is_self_cloned(void)
|
||||||
struct statfs fsbuf = {};
|
struct statfs fsbuf = {};
|
||||||
|
|
||||||
fd = open("/proc/self/exe", O_RDONLY|O_CLOEXEC);
|
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;
|
return -ENOTRECOVERABLE;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Is the binary a fully-sealed memfd? We don't need CLONED_BINARY_ENV for
|
* Is the binary a fully-sealed memfd? We don't need CLONED_BINARY_ENV for
|
||||||
|
|
Loading…
Reference in New Issue