Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
.github/ | 03-May-2024 | - | 47 | 31 | ||
examples/ | 03-May-2024 | - | 94 | 59 | ||
linux-x86/ | 03-May-2024 | - | 2,216 | 2,209 | ||
test/ | 03-May-2024 | - | 177 | 126 | ||
tools/ | 03-May-2024 | - | 4,114 | 3,233 | ||
.clang-format | D | 03-May-2024 | 181 | 8 | 7 | |
.gitignore | D | 03-May-2024 | 604 | 45 | 35 | |
Android.bp | D | 03-May-2024 | 11.3 KiB | 473 | 420 | |
CPPLINT.cfg | D | 03-May-2024 | 17 | 2 | 1 | |
Cargo.toml | D | 03-May-2024 | 221 | 16 | 12 | |
CleanSpec.mk | D | 03-May-2024 | 2.2 KiB | 52 | 1 | |
HACKING.md | D | 03-May-2024 | 2.3 KiB | 76 | 53 | |
LICENSE | D | 03-May-2024 | 1.5 KiB | 29 | 28 | |
MODULE_LICENSE_BSD | D | 03-May-2024 | 0 | |||
Makefile | D | 03-May-2024 | 7.6 KiB | 244 | 150 | |
NOTICE | D | 03-May-2024 | 1.5 KiB | 28 | 27 | |
OWNERS | D | 03-May-2024 | 183 | 10 | 8 | |
OWNERS.rust | D | 03-May-2024 | 203 | 7 | 5 | |
PRESUBMIT.cfg | D | 03-May-2024 | 195 | 9 | 6 | |
PREUPLOAD.cfg | D | 03-May-2024 | 133 | 6 | 4 | |
README.md | D | 03-May-2024 | 2.8 KiB | 93 | 63 | |
RELEASE.md | D | 03-May-2024 | 530 | 25 | 17 | |
TEST_MAPPING | D | 03-May-2024 | 245 | 17 | 16 | |
arch.h | D | 03-May-2024 | 2.4 KiB | 87 | 68 | |
bpf.c | D | 03-May-2024 | 10.2 KiB | 393 | 303 | |
bpf.h | D | 03-May-2024 | 6.1 KiB | 220 | 152 | |
build.rs | D | 03-May-2024 | 1.3 KiB | 41 | 26 | |
common.mk | D | 03-May-2024 | 32.3 KiB | 953 | 561 | |
dump_constants.cc | D | 03-May-2024 | 1.5 KiB | 51 | 38 | |
elfparse.c | D | 03-May-2024 | 4.7 KiB | 119 | 88 | |
elfparse.h | D | 03-May-2024 | 4 KiB | 100 | 70 | |
gen_constants-inl.h | D | 03-May-2024 | 802 | 31 | 25 | |
gen_constants.c | D | 03-May-2024 | 31 | 2 | 1 | |
gen_constants.sh | D | 03-May-2024 | 1.7 KiB | 62 | 33 | |
gen_syscalls.c | D | 03-May-2024 | 24 | 2 | 1 | |
gen_syscalls.sh | D | 03-May-2024 | 1.5 KiB | 58 | 30 | |
get_googletest.sh | D | 03-May-2024 | 208 | 7 | 3 | |
lib.rs | D | 03-May-2024 | 1.8 KiB | 43 | 3 | |
libconstants.h | D | 03-May-2024 | 401 | 16 | 8 | |
libminijail-private.h | D | 03-May-2024 | 2.6 KiB | 95 | 24 | |
libminijail.c | D | 03-May-2024 | 81 KiB | 3,258 | 2,342 | |
libminijail.h | D | 03-May-2024 | 17.6 KiB | 477 | 132 | |
libminijail.pc.in | D | 03-May-2024 | 157 | 9 | 7 | |
libminijail.rs | D | 03-May-2024 | 10.9 KiB | 390 | 386 | |
libminijail_unittest.cc | D | 03-May-2024 | 29.7 KiB | 1,061 | 814 | |
libminijailpreload.c | D | 03-May-2024 | 4.8 KiB | 148 | 75 | |
libsyscalls.h | D | 03-May-2024 | 409 | 17 | 9 | |
minijail0.1 | D | 03-May-2024 | 15.5 KiB | 365 | 341 | |
minijail0.5 | D | 03-May-2024 | 5.9 KiB | 167 | 126 | |
minijail0.c | D | 03-May-2024 | 2 KiB | 82 | 50 | |
minijail0_cli.c | D | 03-May-2024 | 28.6 KiB | 1,044 | 877 | |
minijail0_cli.h | D | 03-May-2024 | 630 | 28 | 14 | |
minijail0_cli_unittest.cc | D | 03-May-2024 | 14.8 KiB | 529 | 309 | |
navbar.md | D | 03-May-2024 | 348 | 12 | 9 | |
parse_seccomp_policy.cc | D | 03-May-2024 | 2.7 KiB | 110 | 85 | |
platform2_preinstall.sh | D | 03-May-2024 | 323 | 16 | 7 | |
scoped_minijail.h | D | 03-May-2024 | 639 | 33 | 18 | |
setup.py | D | 03-May-2024 | 1.8 KiB | 52 | 31 | |
signal_handler.c | D | 03-May-2024 | 1.6 KiB | 83 | 55 | |
signal_handler.h | D | 03-May-2024 | 346 | 15 | 4 | |
syscall_filter.c | D | 03-May-2024 | 22.2 KiB | 878 | 601 | |
syscall_filter.h | D | 03-May-2024 | 1.6 KiB | 70 | 46 | |
syscall_filter_unittest.cc | D | 03-May-2024 | 57.4 KiB | 2,022 | 1,449 | |
syscall_filter_unittest_macros.h | D | 03-May-2024 | 3.6 KiB | 126 | 101 | |
syscall_wrapper.c | D | 03-May-2024 | 875 | 35 | 21 | |
syscall_wrapper.h | D | 03-May-2024 | 246 | 7 | 1 | |
system.c | D | 03-May-2024 | 12.8 KiB | 506 | 314 | |
system.h | D | 03-May-2024 | 1.5 KiB | 68 | 42 | |
system_unittest.cc | D | 03-May-2024 | 10.5 KiB | 334 | 220 | |
testrunner.cc | D | 03-May-2024 | 704 | 33 | 17 | |
util.c | D | 03-May-2024 | 12.7 KiB | 546 | 394 | |
util.h | D | 03-May-2024 | 7.5 KiB | 243 | 87 | |
util_unittest.cc | D | 03-May-2024 | 4.9 KiB | 161 | 118 |
README.md
1# Minijail 2 3The Minijail homepage and main repo is 4https://android.googlesource.com/platform/external/minijail/. 5 6There might be other copies floating around, but this is the official one! 7 8[TOC] 9 10## What is it? 11 12Minijail is a sandboxing and containment tool used in Chrome OS and Android. 13It provides an executable that can be used to launch and sandbox other programs, 14and a library that can be used by code to sandbox itself. 15 16## Getting the code 17 18You're one `git clone` away from happiness. 19 20``` 21$ git clone https://android.googlesource.com/platform/external/minijail 22$ cd minijail 23``` 24 25Releases are tagged as `linux-vXX`: 26https://android.googlesource.com/platform/external/minijail/+refs 27 28## Building 29 30See the [HACKING.md](./HACKING.md) document for more details. 31 32## Release process 33 34See the [RELEASE.md](./RELEASE.md) document for more details. 35 36## Additional tools 37 38See the [tools/README.md](./tools/README.md) document for more details. 39 40## Contact 41 42We've got a couple of contact points. 43 44* [minijail@chromium.org]: Public user & developer mailing list. 45* [minijail-users@google.com]: Internal Google user mailing list. 46* [minijail-dev@google.com]: Internal Google developer mailing list. 47* [crbug.com/list]: Existing bug reports & feature requests. 48* [crbug.com/new]: File new bug reports & feature requests. 49* [AOSP Gerrit]: Code reviews. 50 51[minijail@chromium.org]: https://groups.google.com/a/chromium.org/forum/#!forum/minijail 52[minijail-users@google.com]: https://groups.google.com/a/google.com/forum/#!forum/minijail-users 53[minijail-dev@google.com]: https://groups.google.com/a/google.com/forum/#!forum/minijail-dev 54[crbug.com/list]: https://crbug.com/?q=component:OS>Systems>Minijail 55[crbug.com/new]: https://bugs.chromium.org/p/chromium/issues/entry?components=OS>Systems>Minijail 56[AOSP Gerrit]: https://android-review.googlesource.com/q/project:platform/external/minijail 57 58## Talks and presentations 59 60The following talk serves as a good introduction to Minijail and how it can be used. 61 62[Video](https://drive.google.com/file/d/0BwPS_JpKyELWZTFBcTVsa1hhYjA/preview), 63[slides](https://docs.google.com/presentation/d/1r6LpvDZtYrsl7ryOV4HtpUR-phfCLRL6PA-chcL1Kno/present). 64 65## Example usage 66 67The Chromium OS project has a comprehensive 68[sandboxing](https://chromium.googlesource.com/chromiumos/docs/+/master/sandboxing.md) 69document that is largely based on Minijail. 70 71After you play with the simple examples below, you should check that out. 72 73### Change root to any user 74 75``` 76# id 77uid=0(root) gid=0(root) groups=0(root),128(pkcs11) 78# minijail0 -u jorgelo -g 5000 /usr/bin/id 79uid=72178(jorgelo) gid=5000(eng) groups=5000(eng) 80``` 81 82### Drop root while keeping some capabilities 83 84``` 85# minijail0 -u jorgelo -c 3000 -- /bin/cat /proc/self/status 86Name: cat 87... 88CapInh: 0000000000003000 89CapPrm: 0000000000003000 90CapEff: 0000000000003000 91CapBnd: 0000000000003000 92``` 93