xref: /aosp_15_r20/external/libcap/README (revision 2810ac1b38eead2603277920c78344c84ddf3aff)
1*2810ac1bSKiyoung KimThis is a library for getting and setting POSIX.1e (formerly POSIX 6)
2*2810ac1bSKiyoung Kimdraft 15 capabilities.
3*2810ac1bSKiyoung Kim
4*2810ac1bSKiyoung KimNatively supported languages are C/C++ and Go.
5*2810ac1bSKiyoung Kim
6*2810ac1bSKiyoung KimThis library would not have been possible without the help of
7*2810ac1bSKiyoung Kim
8*2810ac1bSKiyoung Kim    Aleph1, Roland Buresund and Andrew Main, Alexander Kjeldaas.
9*2810ac1bSKiyoung Kim
10*2810ac1bSKiyoung KimMore information on capabilities in the Linux kernel, links to the
11*2810ac1bSKiyoung Kimofficial git repository for libcap, release notes and how to report
12*2810ac1bSKiyoung Kimbugs can be found at:
13*2810ac1bSKiyoung Kim
14*2810ac1bSKiyoung Kim    http://sites.google.com/site/fullycapable/
15*2810ac1bSKiyoung Kim
16*2810ac1bSKiyoung KimThe primary upstream git repository is this one:
17*2810ac1bSKiyoung Kim
18*2810ac1bSKiyoung Kim    https://git.kernel.org/pub/scm/libs/libcap/libcap.git/
19*2810ac1bSKiyoung Kim
20*2810ac1bSKiyoung Kim# BUILDING AND INSTALLATION
21*2810ac1bSKiyoung Kim
22*2810ac1bSKiyoung Kim    $ make
23*2810ac1bSKiyoung Kim
24*2810ac1bSKiyoung Kim       builds the library and the programs that are expected to work
25*2810ac1bSKiyoung Kim       on your system. For example, if you have Linux-PAM installed,
26*2810ac1bSKiyoung Kim       pam_cap is built. A golang installation is required to build
27*2810ac1bSKiyoung Kim       the Go packages.
28*2810ac1bSKiyoung Kim
29*2810ac1bSKiyoung Kim    $ make test
30*2810ac1bSKiyoung Kim
31*2810ac1bSKiyoung Kim       runs all of the tests not requiring privilege
32*2810ac1bSKiyoung Kim
33*2810ac1bSKiyoung Kim    $ make sudotest
34*2810ac1bSKiyoung Kim
35*2810ac1bSKiyoung Kim       runs all of the tests including those that require privilege.
36*2810ac1bSKiyoung Kim
37*2810ac1bSKiyoung Kim    $ sudo make install
38*2810ac1bSKiyoung Kim
39*2810ac1bSKiyoung Kim       default installs the library libcap.XX.Y in /lib[64]/
40*2810ac1bSKiyoung Kim       the binaries in /sbin/
41*2810ac1bSKiyoung Kim       the header files in /usr/include
42*2810ac1bSKiyoung Kim       the {libcap,libpsx}.pc files in /usr/lib[64]/pkgconfig
43*2810ac1bSKiyoung Kim       the Go packages (if built) under /usr/share/gocode/src
44*2810ac1bSKiyoung Kim
45*2810ac1bSKiyoung KimFor some example C programs look in the progs/ directory.
46*2810ac1bSKiyoung KimSpecifically, capsh, getpcaps, setcap and getcap. There are some C
47*2810ac1bSKiyoung Kimtests in the tests/ directory.
48*2810ac1bSKiyoung Kim
49*2810ac1bSKiyoung KimGo example programs are to be found in the goapps/ directory. There
50*2810ac1bSKiyoung Kimare also some more complicated integration tests in the go/ directory.
51*2810ac1bSKiyoung Kim
52*2810ac1bSKiyoung KimThere are also some oddball experimental things in the contrib/
53*2810ac1bSKiyoung Kimdirectory, but they are mostly curiosities.
54*2810ac1bSKiyoung Kim
55*2810ac1bSKiyoung KimCheers
56*2810ac1bSKiyoung Kim
57*2810ac1bSKiyoung KimAndrew G. Morgan <[email protected]>
58