Skip to content

Commit

Permalink
Add support for new Docker init process /sbin/docker-init
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Sep 12, 2019
1 parent 61fe50d commit 08d8017
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "activatecontaineruid"
version = "0.9.1"
version = "0.9.2"
authors = ["Hongli Lai <[email protected]>"]
edition = "2018"

Expand Down
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ fn check_running_allowed() {
of the following conditions apply:\n\
\n \
- This program is run as PID 1.\n \
- This program is a child of PID 1, and PID 1 is the Docker init process /dev/init.\n \
- This program is a child of PID 1, and PID 1 is the Docker \
init process (/dev/init, /sbin/docker-init).\n \
- This program is run with root privileges (but not \
via the setuid root bit)."
);
Expand Down Expand Up @@ -105,7 +106,7 @@ fn is_child_of_pid1_docker_init() -> bool {
match result {
Ok(output) => {
if output.status.success() {
output.stdout == b"/dev/init\n"
output.stdout == b"/dev/init\n" || output.stdout == b"/sbin/docker-init\n"
} else {
warn!(
"Error determining whether PID 1 is the Docker init process \
Expand Down

0 comments on commit 08d8017

Please sign in to comment.