-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
55 changed files
with
593 additions
and
473 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
# We use GNU indent from the Makefile to format C code in this project. Alas, | ||
# there is no way to map indent options to clang-format style options in a way | ||
# to achieve identical results for both formatters. | ||
# | ||
# Therefore, let's disable clang-format entirely. | ||
DisableFormat: true | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env bats | ||
|
||
load helpers | ||
|
||
function setup() { | ||
setup_busybox | ||
update_config '.process.args = ["/bin/cat", "/proc/self/status"]' | ||
} | ||
|
||
function teardown() { | ||
teardown_bundle | ||
} | ||
|
||
@test "runc run no capability" { | ||
runc run test_no_caps | ||
[ "$status" -eq 0 ] | ||
|
||
[[ "${output}" == *"CapInh: 0000000000000000"* ]] | ||
[[ "${output}" == *"CapAmb: 0000000000000000"* ]] | ||
[[ "${output}" == *"NoNewPrivs: 1"* ]] | ||
} | ||
|
||
@test "runc run with unknown capability" { | ||
update_config '.process.capabilities.bounding = ["CAP_UNKNOWN", "UNKNOWN_CAP"]' | ||
runc run test_unknown_caps | ||
[ "$status" -eq 0 ] | ||
|
||
[[ "${output}" == *"CapInh: 0000000000000000"* ]] | ||
[[ "${output}" == *"CapAmb: 0000000000000000"* ]] | ||
[[ "${output}" == *"NoNewPrivs: 1"* ]] | ||
} | ||
|
||
@test "runc run with new privileges" { | ||
update_config '.process.noNewPrivileges = false' | ||
runc run test_new_privileges | ||
[ "$status" -eq 0 ] | ||
|
||
[[ "${output}" == *"CapInh: 0000000000000000"* ]] | ||
[[ "${output}" == *"CapAmb: 0000000000000000"* ]] | ||
[[ "${output}" == *"NoNewPrivs: 0"* ]] | ||
} | ||
|
||
@test "runc run with some capabilities" { | ||
update_config '.process.user = {"uid":0}' | ||
update_config '.process.capabilities.bounding = ["CAP_SYS_ADMIN"]' | ||
update_config '.process.capabilities.permitted = ["CAP_SYS_ADMIN", "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE"]' | ||
runc run test_some_caps | ||
[ "$status" -eq 0 ] | ||
|
||
[[ "${output}" == *"CapInh: 0000000000000000"* ]] | ||
[[ "${output}" == *"CapBnd: 0000000000200000"* ]] | ||
[[ "${output}" == *"CapEff: 0000000000200000"* ]] | ||
[[ "${output}" == *"CapPrm: 0000000000200000"* ]] | ||
[[ "${output}" == *"NoNewPrivs: 1"* ]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 20 additions & 2 deletions
22
vendor/github.com/opencontainers/selinux/go-selinux/label/label.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.