DOKK / manpages / debian 11 / cado / caprint.1.en
CAPRINT(1) General Commands Manual CAPRINT(1)

caprint - Capability Ambient Print

caprint [ OPTIONS ] [ pid ]

caprint shows the ambient capabilities of a running program (whose pid can be specified as an optional parameter, otherwise caprint shows the capabilities of caprint itself).

caprint accepts the following options:

run in verbose mode. caprint shows the bitmask for each capability owned by the process and the resulting mask of the capability set.
emit a compact output (a single line composed of a comma separated list of the capability short names). This output can be copied as a capability list for the command cado(1).
this option has been created to provide users with a suitable shell prompt to warn the users of the extra capabilities granted to that shell (and of the extra danger in case of running wrong commands). As an example, it is possible to set the bash prompt editing the .bashrc in the user's home directory:

if which caprint >&/dev/null ; then
ambient=$(caprint -p)
fi
PS1='\u@\h:\w\$$ambient'
print a short usage banner and exit.

cado(1), capabilities(7),

June 23, 2016 VirtualSquare Labs