Skip to content

Commit

Permalink
merge branch 'pr-2018'
Browse files Browse the repository at this point in the history
Lifubang (1):
  add prompt when rootless users have no read access to runc bin

LGTMs: @AkihiroSuda @cyphar
Closes opencontainers#2018
  • Loading branch information
cyphar committed May 31, 2020
2 parents e664e73 + 2e8efc1 commit a30f255
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libcontainer/nsenter/cloned_binary.c
Expand Up @@ -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
Expand Down

0 comments on commit a30f255

Please sign in to comment.