Up to higher level directory | |||
Name | Date | Size | |
---|---|---|---|
.clang-format | 22-Oct-2020 | 181 | |
Android.bp | 22-Oct-2020 | 9.3K | |
arch.h | 22-Oct-2020 | 2K | |
bpf.c | 22-Oct-2020 | 10.2K | |
bpf.h | 22-Oct-2020 | 5.9K | |
CleanSpec.mk | 22-Oct-2020 | 2.2K | |
common.mk | 22-Oct-2020 | 32.3K | |
CPPLINT.cfg | 22-Oct-2020 | 17 | |
dump_constants.cc | 22-Oct-2020 | 1.2K | |
elfparse.c | 22-Oct-2020 | 4.7K | |
elfparse.h | 22-Oct-2020 | 4K | |
examples/ | 22-Oct-2020 | ||
gen_constants-inl.h | 22-Oct-2020 | 737 | |
gen_constants.c | 22-Oct-2020 | 31 | |
gen_constants.sh | 22-Oct-2020 | 1.7K | |
gen_syscalls.c | 22-Oct-2020 | 24 | |
gen_syscalls.sh | 22-Oct-2020 | 1.5K | |
get_googletest.sh | 22-Oct-2020 | 208 | |
HACKING.md | 22-Oct-2020 | 2.3K | |
libconstants.h | 22-Oct-2020 | 401 | |
libminijail-private.h | 22-Oct-2020 | 2.6K | |
libminijail.c | 22-Oct-2020 | 76.8K | |
libminijail.h | 22-Oct-2020 | 15.6K | |
libminijail.pc.in | 22-Oct-2020 | 157 | |
libminijail_unittest.cc | 22-Oct-2020 | 23.6K | |
libminijailpreload.c | 22-Oct-2020 | 4.8K | |
libsyscalls.h | 22-Oct-2020 | 409 | |
LICENSE | 22-Oct-2020 | 1.5K | |
linux-x86/ | 22-Oct-2020 | ||
Makefile | 22-Oct-2020 | 7.2K | |
minijail0.1 | 22-Oct-2020 | 14.6K | |
minijail0.5 | 22-Oct-2020 | 5.9K | |
minijail0.c | 22-Oct-2020 | 2K | |
minijail0_cli.c | 22-Oct-2020 | 26.4K | |
minijail0_cli.h | 22-Oct-2020 | 630 | |
minijail0_cli_unittest.cc | 22-Oct-2020 | 13.7K | |
MODULE_LICENSE_BSD | 22-Oct-2020 | 0 | |
navbar.md | 22-Oct-2020 | 348 | |
NOTICE | 22-Oct-2020 | 1.5K | |
OWNERS | 22-Oct-2020 | 108 | |
parse_seccomp_policy.cc | 22-Oct-2020 | 2.6K | |
platform2_preinstall.sh | 22-Oct-2020 | 323 | |
PRESUBMIT.cfg | 22-Oct-2020 | 195 | |
PREUPLOAD.cfg | 22-Oct-2020 | 133 | |
README.md | 22-Oct-2020 | 2.7K | |
RELEASE.md | 22-Oct-2020 | 528 | |
scoped_minijail.h | 22-Oct-2020 | 639 | |
signal_handler.c | 22-Oct-2020 | 1.6K | |
signal_handler.h | 22-Oct-2020 | 346 | |
syscall_filter.c | 22-Oct-2020 | 20.8K | |
syscall_filter.h | 22-Oct-2020 | 1.4K | |
syscall_filter_unittest.cc | 22-Oct-2020 | 52.8K | |
syscall_filter_unittest_macros.h | 22-Oct-2020 | 3K | |
syscall_wrapper.c | 22-Oct-2020 | 875 | |
syscall_wrapper.h | 22-Oct-2020 | 246 | |
system.c | 22-Oct-2020 | 11.8K | |
system.h | 22-Oct-2020 | 1.6K | |
system_unittest.cc | 22-Oct-2020 | 11.4K | |
test/ | 22-Oct-2020 | ||
testrunner.cc | 22-Oct-2020 | 704 | |
tools/ | 22-Oct-2020 | ||
util.c | 22-Oct-2020 | 11.3K | |
util.h | 22-Oct-2020 | 5.3K | |
util_unittest.cc | 22-Oct-2020 | 2.3K |
1 # Minijail 2 3 The Minijail homepage and main repo is 4 https://android.googlesource.com/platform/external/minijail/. 5 6 There might be other copies floating around, but this is the official one! 7 8 [TOC] 9 10 ## What is it? 11 12 Minijail is a sandboxing and containment tool used in Chrome OS and Android. 13 It provides an executable that can be used to launch and sandbox other programs, 14 and a library that can be used by code to sandbox itself. 15 16 ## Getting the code 17 18 You're one `git clone` away from happiness. 19 20 ``` 21 $ git clone https://android.googlesource.com/platform/external/minijail 22 $ cd minijail 23 ``` 24 25 Releases are tagged as `linux-vXX`: 26 https://android.googlesource.com/platform/external/minijail/+refs 27 28 ## Building 29 30 See the [HACKING.md](./HACKING.md) document for more details. 31 32 ## Release process 33 34 See the [RELEASE.md](./RELEASE.md) document for more details. 35 36 ## Contact 37 38 We've got a couple of contact points. 39 40 * [minijail (a] chromium.org]: Public user & developer mailing list. 41 * [minijail-users (a] google.com]: Internal Google user mailing list. 42 * [minijail-dev (a] google.com]: Internal Google developer mailing list. 43 * [crbug.com/list]: Existing bug reports & feature requests. 44 * [crbug.com/new]: File new bug reports & feature requests. 45 * [AOSP Gerrit]: Code reviews. 46 47 [minijail (a] chromium.org]: https://groups.google.com/a/chromium.org/forum/#!forum/minijail 48 [minijail-users (a] google.com]: https://groups.google.com/a/google.com/forum/#!forum/minijail-users 49 [minijail-dev (a] google.com]: https://groups.google.com/a/google.com/forum/#!forum/minijail-dev 50 [crbug.com/list]: https://crbug.com/?q=component:OS>Systems>Minijail 51 [crbug.com/new]: https://bugs.chromium.org/p/chromium/issues/entry?components=OS>Systems>Minijail 52 [AOSP Gerrit]: https://android-review.googlesource.com/q/project:platform/external/minijail 53 54 ## Talks and presentations 55 56 The following talk serves as a good introduction to Minijail and how it can be used. 57 58 [Video](https://drive.google.com/file/d/0BwPS_JpKyELWZTFBcTVsa1hhYjA/preview), 59 [slides](https://docs.google.com/presentation/d/1r6LpvDZtYrsl7ryOV4HtpUR-phfCLRL6PA-chcL1Kno/present). 60 61 ## Example usage 62 63 The Chromium OS project has a comprehensive 64 [sandboxing](https://chromium.googlesource.com/chromiumos/docs/+/master/sandboxing.md) 65 document that is largely based on Minijail. 66 67 After you play with the simple examples below, you should check that out. 68 69 ### Change root to any user 70 71 ``` 72 # id 73 uid=0(root) gid=0(root) groups=0(root),128(pkcs11) 74 # minijail0 -u jorgelo -g 5000 /usr/bin/id 75 uid=72178(jorgelo) gid=5000(eng) groups=5000(eng) 76 ``` 77 78 ### Drop root while keeping some capabilities 79 80 ``` 81 # minijail0 -u jorgelo -c 3000 -- /bin/cat /proc/self/status 82 Name: cat 83 ... 84 CapInh: 0000000000003000 85 CapPrm: 0000000000003000 86 CapEff: 0000000000003000 87 CapBnd: 0000000000003000 88 ``` 89