Skip to content

Commit 6c0765a

Browse files
committed
libbz2: add an io compartment
libbz2 has three parts (two of which are io). There is a core of in-memory compression/decompression, a stdio based file IO interface, and a partial emulation of the gzlib interface.
1 parent 473748b commit 6c0765a

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

lib/libbz2/Compartments.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"compartments": {
3+
"io": {
4+
"symbols": [
5+
"BZ2_bzWriteOpen",
6+
"BZ2_bzWrite",
7+
"BZ2_bzWriteClose",
8+
"BZ2_bzWriteClose64",
9+
"BZ2_bzReadOpen",
10+
"BZ2_bzReadClose",
11+
"BZ2_bzRead",
12+
"BZ2_bzReadGetUnused",
13+
"BZ2_bzopen",
14+
"BZ2_bzdopen",
15+
"BZ2_bzread",
16+
"BZ2_bzwrite",
17+
"BZ2_bzflush",
18+
"BZ2_bzclose",
19+
"BZ2_bzerror"
20+
]
21+
}
22+
}
23+
}

lib/libbz2/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ BZ2DIR= ${SRCTOP}/contrib/bzip2
44

55
LIB= bz2
66
SHLIB_MAJOR= 4
7+
COMPARTMENT_POLICY= ${.CURDIR}/Compartments.json
8+
79
SRCS= bzlib.c blocksort.c compress.c crctable.c decompress.c \
810
huffman.c randtable.c
911
INCS= bzlib.h

0 commit comments

Comments
 (0)