Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
.gitignore | H A D | 04-Apr-2019 | 235 | 19 | 19 | |
CONTRIBUTING.md | H A D | 04-Apr-2019 | 880 | 21 | 15 | |
GNUmakefile | H A D | 02-Mar-2021 | 2.3 KiB | 83 | 54 | |
LICENSE | H A D | 04-Apr-2019 | 1.4 KiB | 27 | 24 | |
README.md | H A D | 12-Apr-2021 | 2.7 KiB | 63 | 41 | |
capability-fd-pair.cc | H A D | 04-Apr-2019 | 5.5 KiB | 189 | 157 | |
capability-fd.cc | H A D | 11-Dec-2023 | 44 KiB | 1,360 | 1,112 | |
capmode.cc | H A D | 27-Aug-2024 | 24.8 KiB | 772 | 608 | |
capsicum-freebsd.h | H A D | 07-Oct-2024 | 1.9 KiB | 72 | 45 | |
capsicum-linux.h | H A D | 04-Apr-2019 | 1.2 KiB | 41 | 23 | |
capsicum-rights.h | H A D | 04-Apr-2019 | 2.9 KiB | 119 | 93 | |
capsicum-test-main.cc | H A D | 16-Feb-2021 | 4.4 KiB | 161 | 136 | |
capsicum-test.cc | H A D | 12-Apr-2021 | 2.8 KiB | 120 | 105 | |
capsicum-test.h | H A D | 02-Mar-2021 | 10.6 KiB | 282 | 208 | |
capsicum.h | H A D | 04-Apr-2019 | 4.5 KiB | 176 | 122 | |
copy_file_range.cc | H A D | 28-Sep-2023 | 7.6 KiB | 229 | 186 | |
fcntl.cc | H A D | 04-Apr-2019 | 14.5 KiB | 412 | 303 | |
fexecve.cc | H A D | 16-Feb-2021 | 6.1 KiB | 208 | 167 | |
ioctl.cc | H A D | 04-Apr-2019 | 6.9 KiB | 235 | 177 | |
linux.cc | H A D | 16-Feb-2021 | 48.9 KiB | 1,501 | 1,182 | |
makefile | H A D | 28-Sep-2023 | 1.6 KiB | 37 | 26 | |
mini-me.c | H A D | 04-Apr-2019 | 1 KiB | 39 | 31 | |
mqueue.cc | H A D | 16-Feb-2021 | 3.2 KiB | 100 | 76 | |
openat.cc | H A D | 12-Mar-2021 | 14.7 KiB | 367 | 247 | |
overhead.cc | H A D | 04-Apr-2019 | 1.3 KiB | 46 | 40 | |
procdesc.cc | H A D | 02-Mar-2021 | 33.5 KiB | 1,098 | 814 | |
rename.cc | H A D | 04-Apr-2019 | 1.6 KiB | 50 | 27 | |
sctp.cc | H A D | 07-Oct-2024 | 7.3 KiB | 216 | 179 | |
select.cc | H A D | 04-Apr-2019 | 4 KiB | 143 | 117 | |
showrights | H A D | 04-Apr-2019 | 4.8 KiB | 100 | 94 | |
smoketest.c | H A D | 04-Apr-2019 | 4.9 KiB | 136 | 103 | |
socket.cc | H A D | 02-Mar-2021 | 11.1 KiB | 351 | 276 | |
syscalls.h | H A D | 13-Sep-2022 | 8.8 KiB | 273 | 202 | |
sysctl.cc | H A D | 04-Apr-2019 | 403 | 16 | 11 | |
waittest.c | H A D | 04-Apr-2019 | 1 KiB | 43 | 39 |
README.md
1# Capsicum User Space Tests 2 3This directory holds unit tests for [Capsicum](http://www.cl.cam.ac.uk/research/security/capsicum/) 4object-capabilities. The tests exercise the syscall interface to a Capsicum-enabled operating system, 5currently either [FreeBSD >=10.x](http://www.freebsd.org) or a modified Linux kernel (the 6[capsicum-linux](http://github.com/google/capsicum-linux) project). 7 8The tests are written in C++11 and use the [Google Test](https://code.google.com/p/googletest/) 9framework, with some additions to fork off particular tests (because a process that enters capability 10mode cannot leave it again). 11 12## Provenance 13 14The original basis for these tests was: 15 16 - [unit tests](https://github.com/freebsd/freebsd/tree/master/tools/regression/security/cap_test) 17 written by Robert Watson and Jonathan Anderson for the original FreeBSD 9.x Capsicum implementation 18 - [unit tests](http://git.chromium.org/gitweb/?p=chromiumos/third_party/kernel-capsicum.git;a=tree;f=tools/testing/capsicum_tests;hb=refs/heads/capsicum) written by Meredydd Luff for the original Capsicum-Linux port. 19 20These tests were coalesced and moved into an independent repository to enable 21comparative testing across multiple OSes, and then substantially extended. 22 23## OS Configuration 24 25### Linux 26 27The following kernel configuration options are needed to run the tests: 28 29 - `CONFIG_SECURITY_CAPSICUM`: enable the Capsicum framework 30 - `CONFIG_PROCDESC`: enable Capsicum process-descriptor functionality 31 - `CONFIG_DEBUG_FS`: enable debug filesystem 32 - `CONFIG_IP_SCTP`: enable SCTP support 33 34### FreeBSD (>= 10.x) 35 36The following kernel configuration options are needed so that all tests can run: 37 38 - `options P1003_1B_MQUEUE`: Enable POSIX message queues (or `kldload mqueuefs`) 39 40## Other Dependencies 41 42### Linux 43 44The following additional development packages are needed to build the full test suite on Linux. 45 46 - `libcaprights`: See below 47 - `libcap-dev`: Provides headers for POSIX.1e capabilities. 48 - `libsctp1`: Provides SCTP library functions. 49 - `libsctp-dev`: Provides headers for SCTP library functions. 50 51 52## Linux libcaprights 53 54The Capsicum userspace library is held in the `libcaprights/` subdirectory. Ideally, this 55library should be built (with `./configure; make` or `dpkg-buildpackage -uc -us`) and 56installed (with `make install` or `dpkg -i libcaprights*.deb`) so that the tests will 57use behave like a normal Capsicum-aware application. 58 59However, if no installed copy of the library is found, the `GNUmakefile` will attempt 60to use the local `libcaprights/*.c` source; this requires `./configure` to have been 61performed in the `libcaprights` subdirectory. The local code is also used for 62cross-compiled builds of the test suite (e.g. `make ARCH=32` or `make ARCH=x32`). 63