Changeset View
Changeset View
Standalone View
Standalone View
lib/libcapsicum/capsicum_helpers.3
Show All 18 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd January 21, 2019 | .Dd January 2, 2020 | ||||
.Dt CAPSICUM_HELPERS 3 | .Dt CAPSICUM_HELPERS 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm caph_limit_stream , | .Nm caph_limit_stream , | ||||
.Nm caph_limit_stdin , | .Nm caph_limit_stdin , | ||||
.Nm caph_limit_stderr , | .Nm caph_limit_stderr , | ||||
.Nm caph_limit_stdout , | .Nm caph_limit_stdout , | ||||
.Nm caph_limit_stdio , | .Nm caph_limit_stdio , | ||||
.Nm caph_stream_rights , | |||||
.Nm caph_cache_tzdata , | .Nm caph_cache_tzdata , | ||||
.Nm caph_cache_catpages , | .Nm caph_cache_catpages , | ||||
.Nm caph_enter , | .Nm caph_enter , | ||||
.Nm caph_enter_casper , | .Nm caph_enter_casper , | ||||
.Nm caph_rights_limit , | .Nm caph_rights_limit , | ||||
.Nm caph_ioctls_limit , | .Nm caph_ioctls_limit , | ||||
.Nm caph_fcntls_limit | .Nm caph_fcntls_limit | ||||
.Nd "set of the capsicum helpers, part of the libcapsicum" | .Nd "set of the capsicum helpers, part of the libcapsicum" | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libcapsicum | .Lb libcapsicum | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In capsicum_helpers.h | .In capsicum_helpers.h | ||||
.Ft int | .Ft int | ||||
.Fn caph_enter "void" | .Fn caph_enter "void" | ||||
.Ft int | .Ft int | ||||
.Fn caph_enter_casper "void" | .Fn caph_enter_casper "void" | ||||
.Ft int | .Ft int | ||||
.Fn caph_rights_limit "int fd" "const cap_righst_t *rights" | .Fn caph_rights_limit "int fd" "const cap_rights_t *rights" | ||||
.Ft int | .Ft int | ||||
.Fn caph_ioctls_limit "int fd" "const unsigned long *cmds" "size_t ncmds" | .Fn caph_ioctls_limit "int fd" "const unsigned long *cmds" "size_t ncmds" | ||||
.Ft int | .Ft int | ||||
.Fn caph_fcntls_limit "int fd" "uint32_t fcntlrights" | .Fn caph_fcntls_limit "int fd" "uint32_t fcntlrights" | ||||
.Ft int | .Ft int | ||||
.Fn caph_limit_stream "int fd" "int flags" | .Fn caph_limit_stream "int fd" "int flags" | ||||
.Ft int | .Ft int | ||||
.Fn caph_limit_stdin "void" | .Fn caph_limit_stdin "void" | ||||
.Ft int | .Ft int | ||||
.Fn caph_limit_stderr "void" | .Fn caph_limit_stderr "void" | ||||
.Ft int | .Ft int | ||||
.Fn caph_limit_stdout "void" | .Fn caph_limit_stdout "void" | ||||
.Ft int | .Ft int | ||||
.Fn caph_limit_stdio "void" | .Fn caph_limit_stdio "void" | ||||
.Ft void | .Ft void | ||||
.Fn caph_stream_rights "cap_rights_t *" "int flags" | |||||
.Ft void | |||||
.Fn caph_cache_tzdata "void" | .Fn caph_cache_tzdata "void" | ||||
.Ft void | .Ft void | ||||
.Fn caph_cache_catpages "void" | .Fn caph_cache_catpages "void" | ||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm caph_enter , | .Nm caph_enter , | ||||
.Nm caph_rights_limit , | .Nm caph_rights_limit , | ||||
.Nm caph_ioctls_limit | .Nm caph_ioctls_limit | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
and | and | ||||
.Fn caph_limit_stdout | .Fn caph_limit_stdout | ||||
limit standard descriptors using the | limit standard descriptors using the | ||||
.Nm caph_limit_stream | .Nm caph_limit_stream | ||||
function. | function. | ||||
.Pp | .Pp | ||||
.Fn caph_limit_stdio | .Fn caph_limit_stdio | ||||
limits stdin, stderr and stdout. | limits stdin, stderr and stdout. | ||||
.Pp | |||||
.Nm caph_stream_rights | |||||
may be used to initialize | |||||
.Fa rights | |||||
with the same rights that a stream would be limited to, as if | |||||
.Fn caph_limit_stream | |||||
had been invoked using the same | |||||
.Fa flags . | |||||
.Pp | .Pp | ||||
.Fn caph_cache_tzdata | .Fn caph_cache_tzdata | ||||
precaches all timezone data needed to use | precaches all timezone data needed to use | ||||
.Li libc | .Li libc | ||||
local time functions. | local time functions. | ||||
.Pp | .Pp | ||||
.Fn caph_cache_catpages | .Fn caph_cache_catpages | ||||
caches Native Language Support (NLS) data. | caches Native Language Support (NLS) data. | ||||
Show All 10 Lines |