caprint(1)

Capability Ambient Print

Section 1 cado bookworm source

Description

CAPRINT

NAME

caprint - Capability Ambient Print

SYNOPSIS

caprint [ OPTIONS ] [ pid ]

DESCRIPTION

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).

OPTIONS

caprint accepts the following options:

-l

--long

run in verbose mode. caprint shows the bitmask for each capability owned by the process and the resulting mask of the capability set.

-c

--compact

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).

-p

--prompt

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’

-h

--help

print a short usage banner and exit.

SEE ALSO

cado(1), capabilities(7),